Skip to content

Commit

Permalink
Merge pull request #140 from lstephen/exception_syntax
Browse files Browse the repository at this point in the history
Fix py3 incompatable exception catching syntax
  • Loading branch information
lstephen authored Oct 11, 2017
2 parents 7380a44 + a821d2a commit 7a052b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions construi/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ def main():
except BuildFailedException:
console.error("\nBuild Failed.\n")
sys.exit(1)
except NoSuchTargetException, e:
except NoSuchTargetException as e:
console.error("\nNo such target: {}\n".format(e.target))
sys.exit(1)
except OperationFailedError, e:
except OperationFailedError as e:
console.error("\nUnexpected Error: {}\n".format(e.msg))
traceback.print_exc()
sys.exit(1)
Expand Down
3 changes: 3 additions & 0 deletions test/test_cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from construi.cli import main

# For now we simply import the file to force a syntax check

0 comments on commit 7a052b2

Please sign in to comment.