Skip to content

Commit

Permalink
Correctly catch expections
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoIannacone committed Aug 25, 2016
1 parent 54bc6ca commit ad5da75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions host/chrome-main.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def main():
while 1:
try:
bundle = read_bundle()
except struct.error, e:
except struct.error as e:
logger.error("Error while reading stdin: \"{}\""
" - Exit.".format(e.message))
sys.exit(1)
Expand All @@ -70,6 +70,6 @@ def parse_and_send_result(b):
if __name__ == '__main__':
try:
main()
except e:
except Exception as e:
logger.error("General error: {}".format(e.message))
sys.exit(0)
2 changes: 1 addition & 1 deletion host/commandhandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def sign(self, bundle):
if new_message:
self.gmail.send(id, new_message)
result = True
except Exception, e:
except Exception as e:
self.logger.exception(e)
finally:
return result
Expand Down

0 comments on commit ad5da75

Please sign in to comment.