From: Mark Hymers Date: Mon, 25 May 2009 20:33:31 +0000 (+0100) Subject: get rid of unused routine X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4906d48d1a74f49fb932799a4d0178e790627528;p=dak get rid of unused routine Signed-off-by: Mark Hymers --- diff --git a/daklib/database.py b/daklib/database.py index 101f93cc..fe7d1931 100755 --- a/daklib/database.py +++ b/daklib/database.py @@ -79,31 +79,6 @@ def init (config, sql): Cnf = config projectB = sql - -def do_query(query): - """ - Executes a database query. Writes statistics / timing to stderr. - - @type query: string - @param query: database query string, passed unmodified - - @return: db result - - @warning: The query is passed B{unmodified}, so be careful what you use this for. - """ - sys.stderr.write("query: \"%s\" ... " % (query)) - before = time.time() - r = projectB.query(query) - time_diff = time.time()-before - sys.stderr.write("took %.3f seconds.\n" % (time_diff)) - if type(r) is int: - sys.stderr.write("int result: %s\n" % (r)) - elif type(r) is types.NoneType: - sys.stderr.write("result: None\n") - else: - sys.stderr.write("pgresult: %s\n" % (r.getresult())) - return r - ################################################################################ def get_suite_id (suite): diff --git a/daklib/queue.py b/daklib/queue.py index df284462..fa1c809e 100755 --- a/daklib/queue.py +++ b/daklib/queue.py @@ -1315,21 +1315,3 @@ SELECT s.version, su.suite_name FROM source s, src_associations sa, suite su self.reject("size for %s doesn't match %s." % (found, file)) return (self.reject_message, None) - - def do_query(self, query): - """ - Executes a database query. Writes statistics / timing to stderr. - - @type query: string - @param query: database query string, passed unmodified - - @return: db result - - @warning: The query is passed B{unmodified}, so be careful what you use this for. - """ - sys.stderr.write("query: \"%s\" ... " % (query)) - before = time.time() - r = self.projectB.query(query) - time_diff = time.time()-before - sys.stderr.write("took %.3f seconds.\n" % (time_diff)) - return r