X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fdbconn.py;h=85052f63b0ae9619735f463f39461f3846cdeab5;hb=388b17e63a6b288d8131dcd430f778c4fe089493;hp=6d954c88884095e1aba61338917d912ddc133660;hpb=379a8dd982fa7a20cdb6efaa39998872b3868eee;p=dak.git diff --git a/daklib/dbconn.py b/daklib/dbconn.py index 6d954c88..85052f63 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 or None 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 None __all__.append('get_suite_architectures')