X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fdbconn.py;h=23aeda6fdad5ae52109eac5fb4f5989d2eb28463;hb=27d0120008e5a9e153d82f1f4db4dd0e78f7d88b;hp=30d1d7d677817e06e1a39a0436f286f0230c707f;hpb=0750ad113069a06ea7e710cf6bc21b0a2314a4a5;p=dak.git diff --git a/daklib/dbconn.py b/daklib/dbconn.py index 30d1d7d6..23aeda6f 100755 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -1097,13 +1097,14 @@ __all__.append('get_or_set_maintainer') def get_maintainer(maintainer_id, session=None): """ - Return the name of the maintainer behind C{maintainer_id}. + Return the name of the maintainer behind C{maintainer_id} or None if that + maintainer_id is invalid. @type maintainer_id: int @param maintainer_id: the id of the maintainer - @rtype: string - @return: the name of the maintainer + @rtype: Maintainer + @return: the Maintainer with this C{maintainer_id} """ privatetrans = False @@ -1112,7 +1113,7 @@ def get_maintainer(maintainer_id, session=None): privatetrans = True try: - return session.query(Maintainer).get(maintainer_id).name + return session.query(Maintainer).get(maintainer_id) finally: if privatetrans: session.close()