diff options
author | Florian Weimer <fw@deneb.enyo.de> | 2007-06-10 12:08:53 +0000 |
---|---|---|
committer | Florian Weimer <fw@deneb.enyo.de> | 2007-06-10 12:08:53 +0000 |
commit | 30671a51f82227167aa75366024a5432e99c672a (patch) | |
tree | 6b36c837010d04871c8ac399fa059fc76cd8bf21 /lib/python/bugs.py | |
parent | 932df50bc9d471015fbe5d9fe206267406ef407a (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.py | 6 |
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 = ?', |