cheetahtemplate/cheetah — pull request #2 by melor (2012-10-04 09:41:51+00:00)
Title: Create non-conflicting template module names

The genUniqueModuleName() implementation generated module name
conflicts when rendering many templates in quick succession.
The combination of poor time resolution of str(time.time()) due
to the default string representation and too small value range
for the random part resulted in this.

Added a simple retry in case of conflicts.

Fixes mysterious looking failures that look like this:

File "cheetah_DynamicallyCompiledCheetahTemplate_1336479589_95_84044.py", line 58, in __init__
TypeError: super() argument 1 must be type, not None