return publish error message
This commit is contained in:
parent
5c05daa007
commit
404412a950
2 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue