Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArtActivity.py
diff options
context:
space:
mode:
Diffstat (limited to 'TurtleArtActivity.py')
-rw-r--r--TurtleArtActivity.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/TurtleArtActivity.py b/TurtleArtActivity.py
index 9dcf352..268f703 100644
--- a/TurtleArtActivity.py
+++ b/TurtleArtActivity.py
@@ -204,6 +204,7 @@ class TurtleArtActivity(activity.Activity):
return
try:
_logger.debug('Opening %s ' % (dsobject.file_path))
+ self._tmp_dsobject = dsobject
self.read_file(dsobject.file_path, plugin=False)
except:
_logger.debug("Couldn't open %s" % (dsobject.file_path))
@@ -225,6 +226,7 @@ class TurtleArtActivity(activity.Activity):
return
_logger.debug('Opening %s ' % (dsobject.file_path))
self.read_file(dsobject.file_path, plugin=True)
+ dsobject.destroy()
def do_load_python_cb(self, button):
''' Load Python code from the Journal. '''
@@ -1350,6 +1352,11 @@ in order to use the plugin.'))
_logger.debug('Opening:' + file_path)
self.tw.load_files(file_path, False)
self.restore_cursor()
+ if hasattr(self, '_tmp_dsobject') and self._tmp_dsobject is not None:
+ _logger.debug('cleaning up after %s' %
+ (self._tmp_dsobject.file_path))
+ self._tmp_dsobject.destroy()
+ self._tmp_dsobject = None
def jobject_new_patch(self):
''' Save instance to Journal. '''