Skip to content

Commit

Permalink
Unqualified exceptions in commands/__init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Smith committed Nov 3, 2014
1 parent 604c647 commit 7dfba6b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class HelpAction(argparse.Action):
because Python 3.4's argparse is ever-so subtly very broken.
"""
def __call__(self, parser, namespace, values, option_string=None):
raise UsageError("TradeDangerous help", parser.format_help())
raise exceptions.UsageError("TradeDangerous help", parser.format_help())


def addArguments(group, options, required, topGroup=None):
Expand Down Expand Up @@ -108,7 +108,9 @@ def usage(self, argv):

def parse(self, argv):
if len(argv) <= 1 or argv[1] == '--help' or argv[1] == '-h':
raise UsageError("TradeDangerous provides a set of Trade Database facilities for Elite:Dangerous.", self.usage(argv))
raise exceptions.UsageError(
"TradeDangerous provides a set of trade database "
"facilities for Elite:Dangerous.", self.usage(argv))

### TODO: Break this model up a bit more so that
### we just try and import the command you specify,
Expand Down

0 comments on commit 7dfba6b

Please sign in to comment.