diff options
author | Sean Finney <seanius@debian.org> | 2008-06-28 22:04:47 +0200 |
---|---|---|
committer | Sean Finney <seanius@debian.org> | 2008-06-28 22:04:47 +0200 |
commit | ce5734f06e10f6dc8b98b1feeae7d5a052304b97 (patch) | |
tree | c8c0f978997dff527abd8959b9260f36ad489cdc /patchtracker/DB.py | |
parent | 99cf99a71f5a5aa0bf88706ce9dcbfbfdb957888 (diff) | |
download | patch-tracker-ce5734f06e10f6dc8b98b1feeae7d5a052304b97.tar.gz |
fix a long overdue XXX wrt diffgz's in pagehandler
Diffstat (limited to 'patchtracker/DB.py')
-rw-r--r-- | patchtracker/DB.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/patchtracker/DB.py b/patchtracker/DB.py index 4160b90..119d97a 100644 --- a/patchtracker/DB.py +++ b/patchtracker/DB.py @@ -133,6 +133,16 @@ class PatchTrackerDB: cursor = self.db.cursor() cursor.execute(q, (name, version, suite, component)) + def findDiffGz(self, pkgname, version): + q = "SELECT diffgz_name,loc FROM packages WHERE name=? AND version=?" + cursor = self.db.cursor() + cursor.execute(q, (pkgname, version)) + try: + diffgz,loc = cursor.fetchone() + return os.sep.join([Conf.archive_root, loc, diffgz]) + except: + return None + def finalize(self): self.db.commit() |