Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

...
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 2 contributors
Showing with 6 additions and 8 deletions.
  1. +6 −8 cheetah/Compiler.py
14 cheetah/Compiler.py
View
@@ -1096,14 +1096,12 @@ def _addAutoCleanupCode(self):
self.addChunk('')
def addStop(self, expr=None):
- self.addChunk('if _dummyTrans:')
- self.indent()
- self.addChunk('return trans.response().getvalue()')
- self.dedent()
- self.addChunk('else:')
- self.indent()
- self.addChunk('return None')
- self.dedent()
+ if self.setting('autoAssignDummyTransactionToSelf'):
+ empty = None
+ else:
+ empty = ''
+
+ self.addChunk('return _dummyTrans and trans.response().getvalue() or %r' % empty)
def addMethArg(self, name, defVal=None):
self._argStringList.append( (name, defVal) )

No commit comments for this range

Something went wrong with that request. Please try again.