[Secure-testing-commits] r5989 - lib/python
fw at alioth.debian.org
fw at alioth.debian.org
Sun Jun 10 12:08:54 UTC 2007
Author: fw
Date: 2007-06-10 12:08:53 +0000 (Sun, 10 Jun 2007)
New Revision: 5989
Modified:
lib/python/bugs.py
Log:
* lib/python/bugs.py (PackageNote, BugBase, Bug):
Losen type checks for string arguments, to support Unicode strings.
Modified: lib/python/bugs.py
===================================================================
--- lib/python/bugs.py 2007-06-10 12:08:52 UTC (rev 5988)
+++ lib/python/bugs.py 2007-06-10 12:08:53 UTC (rev 5989)
@@ -48,7 +48,7 @@
self.id = None
self.package = package
if (fixed_version is not None
- and type(fixed_version) == types.StringType):
+ and type(fixed_version) in types.StringTypes):
self.fixed_version = debian_support.Version(fixed_version)
else:
self.fixed_version = fixed_version
@@ -246,7 +246,7 @@
re_cve_name = re.compile(r'^CVE-\d{4}-\d{4}$')
def __init__(self, fname, lineno, date, name, description, comments):
- assert type(fname) == types.StringType
+ assert type(fname) in types.StringTypes
assert type(lineno) == types.IntType
self.source_file = fname
self.source_line = lineno
@@ -376,7 +376,7 @@
class BugFromDB(Bug):
def __init__(self, cursor, name):
- assert type(name) == types.StringType
+ assert type(name) in types.StringTypes
def lookup(bug):
for r in cursor.execute('SELECT * FROM bugs WHERE name = ?',
More information about the Secure-testing-commits
mailing list