VirtualMailManager/handler.py
branchv0.7.x
changeset 753 3f1cecdcdfca
parent 750 8931c6b8435e
child 756 139ced0fea1e
--- a/VirtualMailManager/handler.py	Sun Jun 08 17:15:55 2014 +0000
+++ b/VirtualMailManager/handler.py	Mon Jun 09 17:34:31 2014 +0000
@@ -452,8 +452,10 @@
         dom = self._get_domain(domainname)
         dom.update_note(note)
 
-    def domain_delete(self, domainname, force=False):
+    def domain_delete(self, domainname, del_dir, force=False):
         """Wrapper around Domain.delete()"""
+        if not isinstance(del_dir, bool):
+            raise TypeError('del_dir must be a bool')
         if not isinstance(force, bool):
             raise TypeError('force must be a bool')
         dom = self._get_domain(domainname)
@@ -463,7 +465,7 @@
             dom.delete(True)
         else:
             dom.delete(False)
-        if self._cfg.dget('domain.delete_directory'):
+        if del_dir or self._cfg.dget('domain.delete_directory'):
             self._delete_domain_dir(domdir, gid)
 
     def domain_info(self, domainname, details=None):