[Checkins]
SVN: RestrictedPython/trunk/src/RestrictedPython/RCompile.py
- Collector #2295: Comments in PythonScripts could lead to syntax
Andreas Jung
andreas at andreas-jung.com
Sat Jun 23 03:40:15 EDT 2007
Log message for revision 76958:
- Collector #2295: Comments in PythonScripts could lead to syntax
errors
Changed:
U RestrictedPython/trunk/src/RestrictedPython/RCompile.py
-=-
Modified: RestrictedPython/trunk/src/RestrictedPython/RCompile.py
===================================================================
--- RestrictedPython/trunk/src/RestrictedPython/RCompile.py 2007-06-23 07:35:23 UTC (rev 76957)
+++ RestrictedPython/trunk/src/RestrictedPython/RCompile.py 2007-06-23 07:40:14 UTC (rev 76958)
@@ -46,8 +46,8 @@
# See concrete subclasses below.
def __init__(self, source, filename):
- if source:
- source = '\n'.join(source.splitlines())
+ if source:
+ source = '\n'.join(source.splitlines()) + '\n'
self.rm = RestrictionMutator()
AbstractCompileMode.__init__(self, source, filename)
@@ -213,7 +213,7 @@
def __init__(self, p, body, name, filename, globals):
self.params = p
if body:
- body = '\n'.join(body.splitlines())
+ body = '\n'.join(body.splitlines()) + '\n'
self.body = body
self.name = name
self.globals = globals or []
More information about the Checkins
mailing list