]> git.decadent.org.uk Git - dak.git/commitdiff
get rid of unused routine
authorMark Hymers <mhy@debian.org>
Mon, 25 May 2009 20:33:31 +0000 (21:33 +0100)
committerMark Hymers <mhy@debian.org>
Sun, 9 Aug 2009 15:49:25 +0000 (16:49 +0100)
Signed-off-by: Mark Hymers <mhy@debian.org>
daklib/database.py
daklib/queue.py

index 101f93ccdb3b020f4a514c4080c829c2ea4db6fe..fe7d1931c79c911604c31527fc660c22809d3448 100755 (executable)
@@ -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):
index df2844622246447678dc686c051b4fc78c0c2be4..fa1c809ea0a70b7821b6defa8beab41c8492e576 100755 (executable)
@@ -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