Fix for `TypeError` caused by unicode issues. #1

Merged
merged 1 commit into from Jan 28, 2012
Jump to file or symbol
Failed to load files and symbols.
+6 −2
Split
View
@@ -1,5 +1,5 @@
Version = '2.4.4'
-VersionTuple = (2, 4, 4, 'development', 0)
+VersionTuple = (2, 4, 4, 'development', 1)
MinCompatibleVersion = '2.0rc6'
MinCompatibleVersionTuple = (2, 0, 0, 'candidate', 6)
@@ -17,4 +17,8 @@ def convertTmplPathToModuleName(tmplPath,
_pathNameTransChars=_pathNameTransChars,
splitdrive=os.path.splitdrive,
):
- return splitdrive(tmplPath)[1].translate(_pathNameTransChars)
+ try:
+ moduleName = splitdrive(tmplPath)[1].translate(_pathNameTransChars)
+ except (UnicodeError, TypeError):
+ moduleName = unicode(splitdrive(tmplPath)[1]).translate(unicode(_pathNameTransChars))
+ return moduleName