Skip to content

Commit

Permalink
When translating, Check that the extensions the user asked for are pr…
Browse files Browse the repository at this point in the history
…esent.

Before --withext-* (or --allexts) would silently be ignored if external
extension source code was missing.
  • Loading branch information
vext01 committed Jul 20, 2014
1 parent fd3efb7 commit a137321
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions targethippy.py
Expand Up @@ -12,9 +12,18 @@ def target(driver, args):
parser = to_optparse(config, parserkwargs={'usage': SUPPRESS_USAGE })
parser.parse_args(args)


from hippy.hippyoption import (
OPTIONAL_EXTS, is_optional_extension_enabled, HippyOptionError)

from hippy.hippyoption import set_options
set_options(config)

for ext in OPTIONAL_EXTS:
asked = getattr(config.optexts, ext)
if asked and not is_optional_extension_enabled(ext):
raise HippyOptionError("%s extension sources are missing!" % ext)

from hippy.main import entry_point
return entry_point, None

Expand Down

0 comments on commit a137321

Please sign in to comment.