diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2008-08-13 12:11:28 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2008-08-13 12:11:28 (GMT) |
commit | 5335bb7728b8e5b44085b0fda2e36712820a24ba (patch) | |
tree | fdc22c7491b9f4f91fa3841aaea40a228d033475 /scripts | |
parent | c5efa9633e7b05bacdf3f3feb5977af855a0ecdc (diff) |
Better missing deps handling.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/check.py | 13 | ||||
-rw-r--r-- | scripts/report.py | 13 |
2 files changed, 12 insertions, 14 deletions
diff --git a/scripts/check.py b/scripts/check.py index d117aa7..3ee619c 100644 --- a/scripts/check.py +++ b/scripts/check.py @@ -128,12 +128,6 @@ class cmd_check(Command): print 'Done.' def run(self, config, options, args): - try: - import gobject - except ImportError: - print 'You need pygobject to use this command.' - return 1 - result = 0 xvfb_pid = self.start_xvfb() @@ -148,4 +142,9 @@ class cmd_check(Command): return result -register_command(cmd_check) +try: + import gobject + + register_command(cmd_check) +except ImportError: + print 'Disable check, pygobject is not installed.' diff --git a/scripts/report.py b/scripts/report.py index dbfe7db..41e9a00 100644 --- a/scripts/report.py +++ b/scripts/report.py @@ -246,12 +246,6 @@ class cmd_report(Command): ]) def run(self, config, options, args): - try: - import json - except ImportError: - print 'You need python json-py to use this command.' - return 1 - report_types = [ 'reviews', 'release' ] if options.type not in report_types: @@ -289,4 +283,9 @@ class cmd_report(Command): report.save() -register_command(cmd_report) +try: + import json + + register_command(cmd_report) +except ImportError: + print 'Disable report, json-py is not installed.' |