From 32ecdd8ad628edd6affa6a0d4496a121b5a67a53 Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Thu, 04 Oct 2007 20:46:32 +0000 Subject: Merge branch 'master' of git+ssh://dev.laptop.org/git/sugar --- (limited to 'sugar/bundle/contentbundle.py') diff --git a/sugar/bundle/contentbundle.py b/sugar/bundle/contentbundle.py index 7f9fddb..517ee9a 100644 --- a/sugar/bundle/contentbundle.py +++ b/sugar/bundle/contentbundle.py @@ -21,7 +21,7 @@ from ConfigParser import ConfigParser import os from sugar import env -from sugar.bundle.bundle import Bundle +from sugar.bundle.bundle import Bundle, NotInstalledException class ContentBundle(Bundle): """A Sugar content bundle @@ -178,5 +178,12 @@ class ContentBundle(Bundle): self._run_indexer() def uninstall(self): - self._uninstall() + if self._unpacked: + if not self.is_installed(): + raise NotInstalledException + install_dir = self._path + else: + install_dir = os.path.join(env.get_user_library_path(), + self._zip_root_dir) + self._uninstall(install_dir) self._run_indexer() -- cgit v0.9.1