diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2008-08-13 08:33:26 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2008-08-13 08:33:26 (GMT) |
commit | 1919ca986581280f0b4624a8156228e15a7042a4 (patch) | |
tree | 3fcaf5b8974c68d4bee310f76b2f155e3c3d3b88 /scripts | |
parent | 7cdf8e9e825477aabf0b94df33f259e78280e7b7 (diff) |
Make json and gobject optional.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/check.py | 8 | ||||
-rw-r--r-- | scripts/report.py | 6 |
2 files changed, 12 insertions, 2 deletions
diff --git a/scripts/check.py b/scripts/check.py index f665e66..2054834 100644 --- a/scripts/check.py +++ b/scripts/check.py @@ -6,8 +6,6 @@ import signal import subprocess import time -import gobject - from jhbuild.commands import Command, register_command scripts_dir = os.path.dirname(__file__) @@ -130,6 +128,12 @@ 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() diff --git a/scripts/report.py b/scripts/report.py index 0571b29..0f249f2 100644 --- a/scripts/report.py +++ b/scripts/report.py @@ -247,6 +247,12 @@ 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: |