summaryrefslogtreecommitdiffstats
path: root/module/PyPackage.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-01-01 13:36:59 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-01-01 13:36:59 +0100
commit35742c2cb023ac49ab3056752d2040cdb030cc2b (patch)
treed0f22f591b2b81ab24a982a44820a3d86ba5eea3 /module/PyPackage.py
parentmissing import (diff)
downloadpyload-35742c2cb023ac49ab3056752d2040cdb030cc2b.tar.xz
Happy new Year !
Diffstat (limited to 'module/PyPackage.py')
-rw-r--r--module/PyPackage.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/module/PyPackage.py b/module/PyPackage.py
index dce501d93..d4b468f9c 100644
--- a/module/PyPackage.py
+++ b/module/PyPackage.py
@@ -69,6 +69,13 @@ class PyPackage():
def delete(self):
self.m.deletePackage(self.id)
-
+
+ def deleteIfEmpty(self):
+ """ True if deleted """
+ if not len(self.getChildren()):
+ self.delete()
+ return True
+ return False
+
def notifyChange(self):
self.m.core.eventManager.dispatchEvent("packageUpdated", self.id)