X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fdbconn.py;h=f2dca8fa693ed58089d2e9d0a454732d05e70e17;hb=3210a768ef56cee5f2aaac44f52fa8e6352fbc94;hp=6d954c88884095e1aba61338917d912ddc133660;hpb=07f1501528d921e08f09fbb29452b3252e57aa2d;p=dak.git diff --git a/daklib/dbconn.py b/daklib/dbconn.py index 6d954c88..f2dca8fa 100755 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -3005,11 +3005,11 @@ __all__.append('get_suite') ################################################################################ -# TODO: should be removed because the implementation is too trivial @session_wrapper def get_suite_architectures(suite, skipsrc=False, skipall=False, session=None): """ - Returns list of Architecture objects for given C{suite} name + Returns list of Architecture objects for given C{suite} name. The list is + empty if suite does not exist. @type suite: str @param suite: Suite name to search for @@ -3030,7 +3030,10 @@ def get_suite_architectures(suite, skipsrc=False, skipall=False, session=None): @return: list of Architecture objects for the given name (may be empty) """ - return get_suite(suite, session).get_architectures(skipsrc, skipall) + try: + return get_suite(suite, session).get_architectures(skipsrc, skipall) + except AttributeError: + return [] __all__.append('get_suite_architectures')