VMM/handler: Handler.domain_delete() Added parameter del_dir. v0.7.x
authorPascal Volk <user@localhost.localdomain.org>
Mon, 09 Jun 2014 17:34:31 +0000
branchv0.7.x
changeset 753 3f1cecdcdfca
parent 752 271bd82c05c0
child 754 8363ea6240a5
VMM/handler: Handler.domain_delete() Added parameter del_dir.
VirtualMailManager/handler.py
--- 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):