diff options
author | Florian Weimer <fw@deneb.enyo.de> | 2007-12-25 16:57:24 +0000 |
---|---|---|
committer | Florian Weimer <fw@deneb.enyo.de> | 2007-12-25 16:57:24 +0000 |
commit | efd6f70f4aca37282697f824d19155e820dd2b1d (patch) | |
tree | 6fe1fab859ef8fe5ff6ed4dd150bf6e361bd6bcc /lib/python/bugs.py | |
parent | 9594291b9d4e2ae943652b71dea99cd8ca826ebd (diff) |
Remove unused methods
The following methods are removed:
bugs.PackageNote.affects
bugs.PackageNote.affectsKernel
bugs.PackageNote.fixedVersion
bugs.PackageNote.sourceStatus
bugs.BugBase.hasTODO
bugs.BugBase.isKernelOnly
git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@7715 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'lib/python/bugs.py')
-rw-r--r-- | lib/python/bugs.py | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/lib/python/bugs.py b/lib/python/bugs.py index 4aabb497d3..b4563a254e 100644 --- a/lib/python/bugs.py +++ b/lib/python/bugs.py @@ -69,69 +69,6 @@ class PackageNote: self.package_kind = "unknown" self.bug_origin = None - def affects(self, version, release=None): - """Returns true if this package note affects the given version. - - Both version and release can be strings. In this case, they - are automatically promoted to the correct Python objects. - """ - - if type(version) == types.StringType: - version = debian_support.Version(version) - if type(release) == types.StringType: - release = Release(release) - - if release is None: - if self.release is not None: - # If there's a release spec, and we are running for - # testing, this note does apply. - return False - else: - if self.release is not None and self.release <> release: - # If there's a release spec, it must match ours. - return False - # Standard version comparison if the releases match. - return self.fixed_version is None or version < self.fixed_version - - def affectsKernel(self, regexp=re.compile - (r'^kernel-(?:source|image|patch)-[0-9.]{3}')): - """Crude check if this is a kernel package.""" - return regexp.match(self.package) is not None - - def fixedVersion(self): - """ Returns a string noting that the bug was fixed, or 'unfixed'.""" - if self.fixed_version: - return "fixed in %s" % self.fixed_version - else: - return "unfixed" - - def sourceStatus(self, cursor): - """Returns a pair of lists (VERSION, RELEASE-LIST). - - The first one is the list with the vulnerable versions, the - second one contains fixed versions. - """ - - vulnerable_versions = {} - fixed_versions = {} - for (release, archive, version, vulnerable) in cursor.execute( - """SELECT p.release, p.archive, p.version, s.vulnerable - FROM source_package_status AS s, source_packages AS p - WHERE s.note = ? AND p.rowid = s.package""", (self.id,)): - if vulnerable: - versions = vulnerable_versions - else: - versions = fixed_versions - if not versions.has_key(version): - versions[version] = [] - versions[version].append((release, archive)) - - def sort(versions): - l = map(debian_support.Version, versions.keys()) - l.sort() - return map(lambda ver: (ver, versions[str(ver)]), l) - return (sort(vulnerable_versions), sort(fixed_versions)) - def writeDB(self, cursor, bug_name, bug_origin=''): """Writes the object to an SQLite database.""" @@ -275,22 +212,6 @@ class BugBase: else: return '' - def hasTODO(self): - """Returns True if the bug has a TODO item.""" - for (t, c) in self.comments: - if t == "TODO": - return True - return False - - def isKernelOnly(self): - """Returns True if this bug contains notes which refer to kernels.""" - if len(self.notes) == 0: - return False - for n in self.notes: - if not n.affectsKernel(): - return False - return True - def writeDB(self, cursor): """Writes the record to an SQLite3 database.""" |