From dbf51c0efff1c38788c4f21fa2bb7c16915acdb5 Mon Sep 17 00:00:00 2001 From: Torsten Werner Date: Wed, 19 Jan 2011 20:31:53 +0100 Subject: [PATCH 1/1] Remove function get_poolfile_by_name(). Signed-off-by: Torsten Werner --- daklib/dbconn.py | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/daklib/dbconn.py b/daklib/dbconn.py index b46eede7..ab97fdd2 100755 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -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): """ -- 2.39.2