VirtualMailManager/mailbox.py
branchv0.6.x
changeset 377 920cb090eb09
parent 366 d6573da35b5f
child 386 b7854259ad74
equal deleted inserted replaced
376:2af61bc06215 377:920cb090eb09
   249             cmd_args.append('-s')
   249             cmd_args.append('-s')
   250         cmd_args.extend(mailboxes)
   250         cmd_args.extend(mailboxes)
   251         process = Popen(cmd_args, stdout=PIPE, stderr=PIPE)
   251         process = Popen(cmd_args, stdout=PIPE, stderr=PIPE)
   252         stdout, stderr = process.communicate()
   252         stdout, stderr = process.communicate()
   253         if process.returncode:
   253         if process.returncode:
   254             raise VMMError(stderr.strip(), VMM_ERROR)
   254             e_msg = _(u'Failed to create mailboxes: %r\n') % mailboxes
       
   255             raise VMMError(e_msg + stderr.strip(), VMM_ERROR)
   255 
   256 
   256     def create(self):
   257     def create(self):
   257         """Create a dbox INBOX"""
   258         """Create a dbox INBOX"""
   258         os.mkdir(self._root, cfg_dget('account.directory_mode'))
   259         os.mkdir(self._root, cfg_dget('account.directory_mode'))
   259         os.chown(self._root, self._user.uid, self._user.gid)
   260         os.chown(self._root, self._user.uid, self._user.gid)