]> err.no Git - dak/commitdiff
Fix traceback when given suite is not recognized
authorLuca Falavigna <dktrkranz@debian.org>
Tue, 4 Oct 2011 09:26:20 +0000 (09:26 +0000)
committerLuca Falavigna <dktrkranz@debian.org>
Tue, 4 Oct 2011 09:26:20 +0000 (09:26 +0000)
Signed-off-by: Luca Falavigna <dktrkranz@debian.org>
daklib/utils.py

index 40e47c63e45830887d213f10d8d381ebd75457a3..c144624a21b13b2872b455badccfd8279bb31efb 100755 (executable)
@@ -1022,8 +1022,8 @@ def parse_args(Options):
         suite_ids_list = []
         for suitename in split_args(Options["Suite"]):
             suite = get_suite(suitename, session=session)
-            if suite.suite_id is None:
-                warn("suite '%s' not recognised." % (suite.suite_name))
+            if not suite or suite.suite_id is None:
+                warn("suite '%s' not recognised." % (suite and suite.suite_name or suitename))
             else:
                 suite_ids_list.append(suite.suite_id)
         if suite_ids_list: