Permalink
Browse files

Avoid creating an invalid class name for the file on the path where t…

…he first folder name starts with a number, e.g. c:\10folder\code\sample.tmpl
  • Loading branch information...
1 parent ca28a26 commit 317118d8d3c4229844652a5fa5fca0f3ad7e2149 @mikola committed Oct 22, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 cheetah/Template.py
View
2 cheetah/Template.py
@@ -644,7 +644,7 @@ def __str__(self): return self.respond()
if not isinstance(className, (types.NoneType, basestring)):
raise TypeError(errmsg % ('className', 'string or None'))
- className = re.sub(r'^_+','', className or moduleName)
+ className = re.sub(r'^_+([^0-9])',r'\1', className or moduleName)
if mainMethodName is Unspecified:
mainMethodName = klass._CHEETAH_defaultMainMethodNameForTemplates

0 comments on commit 317118d

Please sign in to comment.