return publish error message

This commit is contained in:
Jack 2016-07-11 21:57:34 -04:00
parent 5c05daa007
commit 404412a950
2 changed files with 4 additions and 4 deletions

View file

@ -35,7 +35,7 @@ def main():
if len(args) > 1:
if isinstance(args[1], dict):
params = args[1]
elif isinstance(args[1], str) or isinstance(args[1], unicode):
elif isinstance(args[1], str, unicode):
params = json.loads(args[1])
else:
params = None

View file

@ -127,11 +127,11 @@ class Publisher(object):
log.info(err.getTraceback())
message = "An error occurred publishing %s to %s. Error: %s."
if err.check(InsufficientFundsError):
d = defer.succeed(True)
error_message = "Insufficient funds"
else:
d = defer.succeed(True)
error_message = err.getErrorMessage()
log.error(error_message)
log.error(message, str(self.file_name), str(self.publish_name), err.getTraceback())
return d
return defer.succeed(error_message)