Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pippy_app.py
diff options
context:
space:
mode:
authorflavio <fdanesse@gmail.com>2012-09-09 23:25:00 (GMT)
committer flavio <fdanesse@gmail.com>2012-09-09 23:25:00 (GMT)
commit3940d00df13672c59c34d5bf177c6c536313762a (patch)
tree1fd4ca4c0df12008b5709a117abdc9d32e0c6f13 /pippy_app.py
parent40f862b07b3b26449a7b3260bc7c00739fb081f7 (diff)
Change _shared_activity by shared_activity
Diffstat (limited to 'pippy_app.py')
-rw-r--r--pippy_app.py22
1 files changed, 10 insertions, 12 deletions
diff --git a/pippy_app.py b/pippy_app.py
index 5d20a0f..1f48d99 100644
--- a/pippy_app.py
+++ b/pippy_app.py
@@ -575,18 +575,16 @@ class PippyActivity(ViewSourceActivity, groupthink.sugar_tools.GroupActivity):
def save_to_journal(self, file_path, cloudstring):
- # FIXME When saving in the journal, it throws an error
- #_file = open(file_path, 'w')
- #if not self._shared_activity:
- # self.metadata['mime_type'] = 'text/x-python'
- # global text_buffer
- # start, end = text_buffer.get_bounds()
- # text = text_buffer.get_text(start, end, True)
- # _file.write(text)
- #else:
- # self.metadata['mime_type'] = groupthink_mimetype
- # _file.write(cloudstring)
- pass
+ _file = open(file_path, 'w')
+ if not self.shared_activity:
+ self.metadata['mime_type'] = 'text/x-python'
+ global text_buffer
+ start, end = text_buffer.get_bounds()
+ text = text_buffer.get_text(start, end, True)
+ _file.write(text)
+ else:
+ self.metadata['mime_type'] = groupthink_mimetype
+ _file.write(cloudstring)
def load_from_journal(self, file_path):
if self.metadata['mime_type'] == 'text/x-python':