Skip to content

Commit

Permalink
argparse error throws exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Durrant authored and Jacob Durrant committed Dec 25, 2018
1 parent be60afb commit 6d8117e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dimorphite_dl.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ def error(self, message):
"""

self.print_help()
sys.stderr.write('error: %s\n\n' % message)
sys.exit(2)
msg = "ERROR: %s\n\n" % message
print(msg)
raise Exception(msg)

def print_help(self, file=None):
"""Overwrite the default print_help function
Expand Down

0 comments on commit 6d8117e

Please sign in to comment.