Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArtActivity.py
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2012-11-08 17:56:07 (GMT)
committer Walter Bender <walter.bender@gmail.com>2012-11-08 17:56:07 (GMT)
commit24ffc688aa24ed4dec4906e0889d5a42dce1f96f (patch)
treed6363ea076a10475e0b30d1fab8f64afae1a5bfd /TurtleArtActivity.py
parent0c74a3f79abfd56fc6a6cb0788e2c26e2feaa6dd (diff)
make sure self.tw exists before init to be consistent with GNOME version
Diffstat (limited to 'TurtleArtActivity.py')
-rw-r--r--TurtleArtActivity.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/TurtleArtActivity.py b/TurtleArtActivity.py
index 5ea2213..af3acc9 100644
--- a/TurtleArtActivity.py
+++ b/TurtleArtActivity.py
@@ -78,6 +78,7 @@ class TurtleArtActivity(activity.Activity):
except dbus.exceptions.DBusException, e:
_logger.error(str(e))
+ self.tw = None
self._check_ver_change(get_path(activity, 'data'))
self.connect("notify::active", self._notify_active_cb)
@@ -1073,7 +1074,7 @@ in order to use the plugin.'))
def read_file(self, file_path, run_it=False, plugin=False):
''' Open a project or plugin and then run it. '''
- if hasattr(self, 'tw'):
+ if hasattr(self, 'tw') and self.tw is not None:
_logger.debug('Read file: %s' % (file_path))
# Could be a plugin or deprecated gtar or tar file...
if plugin or file_path.endswith(('.gtar', '.tar', '.tar.gz')):