2006-06-11 James Troup <james@nocrew.org>
+ * dak/daklib/queue.py (Upload.source_exists): use string object
+ methods rather than string module.
+ (Upload.get_anyversion): likewise.
+
* dak/daklib/utils.py (validate_changes_file_arg): update filename
slicing to cope with new .dak filenames.
if x[1] in s and x[0] not in s:
s.append(x[0])
- que = "SELECT s.version FROM source s JOIN src_associations sa ON (s.id = sa.source) JOIN suite su ON (sa.suite = su.id) WHERE s.source = '%s' AND (%s)" % (package, string.join(["su.suite_name = '%s'" % a for a in s], " OR "))
+ que = "SELECT s.version FROM source s JOIN src_associations sa ON (s.id = sa.source) JOIN suite su ON (sa.suite = su.id) WHERE s.source = '%s' AND (%s)" % (package, " OR ".join(["su.suite_name = '%s'" % a for a in s]))
q = self.projectB.query(que)
# Reduce the query results to a list of version numbers
anyversion=None
anysuite = [suite] + self.Cnf.ValueList("Suite::%s::VersionChecks::Enhances" % (suite))
for (v, s) in query_result:
- if s in [ string.lower(x) for x in anysuite ]:
+ if s in [ x.lower() for x in anysuite ]:
if not anyversion or apt_pkg.VersionCompare(anyversion, v) <= 0:
anyversion=v
return anyversion