diff options
author | C. Scott Ananian <cscott@laptop.org> | 2008-08-14 06:49:45 (GMT) |
---|---|---|
committer | C. Scott Ananian <cscott@laptop.org> | 2008-08-19 19:46:36 (GMT) |
commit | 1bd1b6c81e6a8352f5552fb70da40d21768485be (patch) | |
tree | e3a662196a1112dd1e84ef1bb8a8d8ef9d6f1575 /src/sugar/bundle/activitybundle.py | |
parent | 5ba227ff85d1c4ccd415c8aa4e1e2b0c743f346f (diff) |
Trac #7733: fix severe performance regression when creating ActivityBundle.
Diffstat (limited to 'src/sugar/bundle/activitybundle.py')
-rw-r--r-- | src/sugar/bundle/activitybundle.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sugar/bundle/activitybundle.py b/src/sugar/bundle/activitybundle.py index 5f29a69..be997cc 100644 --- a/src/sugar/bundle/activitybundle.py +++ b/src/sugar/bundle/activitybundle.py @@ -205,13 +205,13 @@ class ActivityBundle(Bundle): def get_locale_path(self): """Get the locale path inside the (installed) activity bundle.""" - if not self._unpacked: + if self._zip_file is not None: raise NotInstalledException return os.path.join(self._path, 'locale') def get_icons_path(self): """Get the icons path inside the (installed) activity bundle.""" - if not self._unpacked: + if self._zip_file is not None: raise NotInstalledException return os.path.join(self._path, 'icons') @@ -237,7 +237,7 @@ class ActivityBundle(Bundle): def get_icon(self): """Get the activity icon name""" icon_path = os.path.join('activity', self._icon + '.svg') - if self._unpacked: + if self._zip_file is None: return os.path.join(self._path, icon_path) else: icon_data = self.get_file(icon_path).read() @@ -365,7 +365,7 @@ class ActivityBundle(Bundle): raise RegistrationException def uninstall(self, force=False): - if self._unpacked: + if self._zip_file is None: install_path = self._path else: if not self.is_installed(): |