projects
/
mw
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e5ac78f
)
Add a logout command
author
Ian Weller
<ian@ianweller.org>
Sun, 14 Mar 2010 07:49:04 +0000
(
01:49
-0600)
committer
Ian Weller
<ian@ianweller.org>
Sun, 14 Mar 2010 07:49:04 +0000
(
01:49
-0600)
src/mw/clicommands.py
patch
|
blob
|
history
diff --git
a/src/mw/clicommands.py
b/src/mw/clicommands.py
index 4b62564cfbf03f7a504fe607a132cb2a6e772c78..33c4177d0ceac2ec134fbc46dc669879e6abf636 100644
(file)
--- a/
src/mw/clicommands.py
+++ b/
src/mw/clicommands.py
@@
-98,6
+98,19
@@
class LoginCommand(CommandBase):
self._login()
self._login()
+class LogoutCommand(CommandBase):
+
+ def __init__(self):
+ CommandBase.__init__(self, 'logout', 'forget authentication')
+
+ def _do_command(self):
+ self._die_if_no_init()
+ try:
+ os.unlink(os.path.join(self.metadir.location, 'cookies'))
+ except OSError:
+ pass
+
+
class PullCommand(CommandBase):
def __init__(self):
class PullCommand(CommandBase):
def __init__(self):
Benjamin Mako Hill
||
Want to submit a patch?