VirtualMailManager/handler.py
branchv0.6.x
changeset 381 98223e5c95e0
parent 380 5aaf2dd6b146
child 390 660b42391c8e
equal deleted inserted replaced
380:5aaf2dd6b146 381:98223e5c95e0
   293         if not dir_created and not lisdir(hashdir):
   293         if not dir_created and not lisdir(hashdir):
   294             raise VMMError(_(u"'%s' is not a directory.") % hashdir,
   294             raise VMMError(_(u"'%s' is not a directory.") % hashdir,
   295                            NO_SUCH_DIRECTORY)
   295                            NO_SUCH_DIRECTORY)
   296         if os.path.exists(domain.directory):
   296         if os.path.exists(domain.directory):
   297             raise VMMError(_(u"The file/directory '%s' already exists.") %
   297             raise VMMError(_(u"The file/directory '%s' already exists.") %
   298                            domdir.directory, VMM_ERROR)
   298                            domain.directory, VMM_ERROR)
   299         os.mkdir(os.path.join(hashdir, domdir),
   299         os.mkdir(os.path.join(hashdir, domdir),
   300                  self._cfg.dget('domain.directory_mode'))
   300                  self._cfg.dget('domain.directory_mode'))
   301         os.chown(domain.directory, 0, domain.gid)
   301         os.chown(domain.directory, 0, domain.gid)
   302         os.chdir(cwd)
   302         os.chdir(cwd)
   303 
   303