Author: fw Date: 2007-06-10 12:08:43 +0000 (Sun, 10 Jun 2007) New Revision: 5987 Modified: lib/python/debian_support.py Log: * lib/python/debian_support.py (Version): Support Unicode strings by converting them to UTF-8. Modified: lib/python/debian_support.py ==================================================================--- lib/python/debian_support.py 2007-06-10 12:08:38 UTC (rev 5986) +++ lib/python/debian_support.py 2007-06-10 12:08:43 UTC (rev 5987) @@ -64,7 +64,11 @@ def __init__(self, version): """Creates a new Version object.""" - assert type(version) == types.StringType, `version` + t = type(version) + if t == types.UnicodeType: + version = version.encode(''UTF-8'') + else: + assert t == types.StringType, `version` assert version <> "" self.__asString = version