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:
d52556c
)
[commit] Fix ugly traceback on permissiondenied
author
Ian Weller
<ian@ianweller.org>
Wed, 2 Feb 2011 20:35:50 +0000
(14:35 -0600)
committer
Ian Weller
<ian@ianweller.org>
Wed, 2 Feb 2011 20:35:50 +0000
(14:35 -0600)
src/mw/clicommands.py
patch
|
blob
|
history
diff --git
a/src/mw/clicommands.py
b/src/mw/clicommands.py
index 0fa122adb0472c6bbe8fbda9eb4cc3aaf3e08f65..7acfba241ef53be5998d0e68cfa5cb82ff6609bb 100644
(file)
--- a/
src/mw/clicommands.py
+++ b/
src/mw/clicommands.py
@@
-305,6
+305,11
@@
class CommitCommand(CommandBase):
if self.options.bot:
data['bot'] = 'bot'
response = self.api.call(data)
+ if 'error' in response:
+ if 'code' in response['error']:
+ if response['error']['code'] == 'permissiondenied':
+ print 'Permission denied -- try running "mw login"'
+ return
if response['edit']['result'] == 'Success':
if 'nochange' in response['edit']:
print 'warning: no changes detected in %s - ' \
Benjamin Mako Hill
||
Want to submit a patch?