Skip to content

Commit

Permalink
minor: captured some errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mfiers committed Oct 22, 2012
1 parent c039be3 commit 024446d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/python/moa/plugin/job/smw/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ def _savePage2(page, txt):
#moa.ui.message("saved change message to SMW")
except mwclient.errors.LoginError:
moa.ui.error("Invalid login for smw - cannot save change message")
except:
moa.ui.error("Cannot save to SMW - uncertain why")
return

def _savePage(page, txt):
background = sysConf.plugins.job.smw.get('background', False)
Expand Down Expand Up @@ -144,11 +147,12 @@ def hook_finish(job):
message = moa.ui._textFormattedMessage(
[sysConf.args.changeMessage,
sysConf.doc.changeMessage] )

if sysConf.commands[sysConf.args.command]['logJob']:
if sysConf.args.command != 'smw_save_job':
_saveJobToSmw(job)
_saveChangeMessage(job, message)

sys.exit(0)

def _checkJobInSmw(job):
Expand Down

0 comments on commit 024446d

Please sign in to comment.