--- a/py_ext/PythonFileCTNMixin.py Fri May 10 10:25:35 2013 +0200
+++ b/py_ext/PythonFileCTNMixin.py Fri May 10 11:47:35 2013 +0200
@@ -77,10 +77,10 @@
("__retrieve_", "", "", self.CodeFile.retrieveFunction),
("__publish_", "", "", self.CodeFile.publishFunction),]:
text += "def %s%s(%s):\n" % (func, location_str, args)
- lines = code_object.gettext().splitlines()
+ lines = code_object.gettext().strip().splitlines()
if len(lines) > 0 or return_code != "":
- for line in code_object.gettext().splitlines():
- text += " " + line
+ for line in lines:
+ text += " " + line + "\n"
text += " " + return_code + "\n\n"
else:
text += " pass\n\n"