Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed a `TypeError` caused because of `unicode` issues in python 2.7.x

commit bbca0d9e1db4710b523271399b3fae89d9993eb7 1 parent 073876f
@lakshmivyas lakshmivyas authored
Showing with 6 additions and 2 deletions.
  1. +1 −1  cheetah/Version.py
  2. +5 −1 cheetah/convertTmplPathToModuleName.py
View
2  cheetah/Version.py
@@ -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)
View
6 cheetah/convertTmplPathToModuleName.py
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.