]> err.no Git - dak/commitdiff
Remove unused function get_binary_from_id().
authorTorsten Werner <twerner@debian.org>
Wed, 26 Jan 2011 06:11:09 +0000 (07:11 +0100)
committerTorsten Werner <twerner@debian.org>
Wed, 26 Jan 2011 06:11:09 +0000 (07:11 +0100)
It is equivalent to DBBinary.get(binary_id[, session]).

Signed-off-by: Torsten Werner <twerner@debian.org>
daklib/dbconn.py

index 9cdf3f8e12a565a7954886d2da9478179ececc18..f69fecd16e4e7e43cc3a4182878b51fcc1b9deff 100755 (executable)
@@ -458,7 +458,7 @@ class DBBinary(ORMObject):
     def properties(self):
         return ['package', 'version', 'maintainer', 'source', 'architecture', \
             'poolfile', 'binarytype', 'fingerprint', 'install_date', \
-            'suites_count']
+            'suites_count', 'binary_id']
 
     def not_null_constraints(self):
         return ['package', 'version', 'maintainer', 'source',  'poolfile', \
@@ -482,31 +482,6 @@ def get_suites_binary_in(package, session=None):
 
 __all__.append('get_suites_binary_in')
 
-@session_wrapper
-def get_binary_from_id(binary_id, session=None):
-    """
-    Returns DBBinary object for given C{id}
-
-    @type binary_id: int
-    @param binary_id: Id of the required binary
-
-    @type session: Session
-    @param session: Optional SQLA session object (a temporary one will be
-    generated if not supplied)
-
-    @rtype: DBBinary
-    @return: DBBinary object for the given binary (None if not present)
-    """
-
-    q = session.query(DBBinary).filter_by(binary_id=binary_id)
-
-    try:
-        return q.one()
-    except NoResultFound:
-        return None
-
-__all__.append('get_binary_from_id')
-
 @session_wrapper
 def get_binaries_from_name(package, version=None, architecture=None, session=None):
     """