]> err.no Git - dak/commitdiff
Remove function get_poolfile_by_name().
authorTorsten Werner <twerner@debian.org>
Wed, 19 Jan 2011 19:31:53 +0000 (20:31 +0100)
committerTorsten Werner <twerner@debian.org>
Wed, 19 Jan 2011 19:31:53 +0000 (20:31 +0100)
Signed-off-by: Torsten Werner <twerner@debian.org>
daklib/dbconn.py

index b46eede790c80edbd8759cd8bbdf64b8709a22d9..ab97fdd26209b91257fa1caafb1a8c9602bae175 100755 (executable)
@@ -1155,32 +1155,6 @@ def get_poolfile_by_id(file_id, session=None):
 
 __all__.append('get_poolfile_by_id')
 
-
-@session_wrapper
-def get_poolfile_by_name(filename, location_id=None, session=None):
-    """
-    Returns an array of PoolFile objects for the given filename and
-    (optionally) location_id
-
-    @type filename: string
-    @param filename: the filename of the file to check against the DB
-
-    @type location_id: int
-    @param location_id: the id of the location to look in (optional)
-
-    @rtype: array
-    @return: array of PoolFile objects
-    """
-
-    q = session.query(PoolFile).filter_by(filename=filename)
-
-    if location_id is not None:
-        q = q.join(Location).filter_by(location_id=location_id)
-
-    return q.all()
-
-__all__.append('get_poolfile_by_name')
-
 @session_wrapper
 def get_poolfile_like_name(filename, session=None):
     """