[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] Fix traceback when given suite is not recognized



Signed-off-by: Luca Falavigna <dktrkranz@debian.org>
---
 daklib/utils.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/daklib/utils.py b/daklib/utils.py
index 40e47c6..c144624 100755
--- a/daklib/utils.py
+++ b/daklib/utils.py
@@ -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:
-- 
1.7.2.5


Reply to: