summaryrefslogtreecommitdiffstats
path: root/lib/python/bugs.py
diff options
context:
space:
mode:
authorFlorian Weimer <fw@deneb.enyo.de>2007-06-10 12:08:53 +0000
committerFlorian Weimer <fw@deneb.enyo.de>2007-06-10 12:08:53 +0000
commit30671a51f82227167aa75366024a5432e99c672a (patch)
tree6b36c837010d04871c8ac399fa059fc76cd8bf21 /lib/python/bugs.py
parent932df50bc9d471015fbe5d9fe206267406ef407a (diff)
* lib/python/bugs.py (PackageNote, BugBase, Bug):
Losen type checks for string arguments, to support Unicode strings. git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@5989 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'lib/python/bugs.py')
-rw-r--r--lib/python/bugs.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/python/bugs.py b/lib/python/bugs.py
index 0f88da6822..4aabb497d3 100644
--- a/lib/python/bugs.py
+++ b/lib/python/bugs.py
@@ -48,7 +48,7 @@ class PackageNote:
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 @@ class BugBase:
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 Bug(BugBase):
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 = ?',

© 2014-2024 Faster IT GmbH | imprint | privacy policy