VirtualMailManager/mailbox.py
branchv0.6.x
changeset 422 33a45e4c80c4
parent 415 c7a963e6cf6e
child 568 14abdd04ddf5
equal deleted inserted replaced
421:ff2a61e155db 422:33a45e4c80c4
   252         cmd_args = [cfg_dget('bin.dovecotpw'), 'mailbox', 'create', '-u',
   252         cmd_args = [cfg_dget('bin.dovecotpw'), 'mailbox', 'create', '-u',
   253                     str(self._user.address)]
   253                     str(self._user.address)]
   254         if subscribe:
   254         if subscribe:
   255             cmd_args.append('-s')
   255             cmd_args.append('-s')
   256         cmd_args.extend(mailboxes)
   256         cmd_args.extend(mailboxes)
   257         process = Popen(cmd_args, stdout=PIPE, stderr=PIPE)
   257         process = Popen(cmd_args, stderr=PIPE)
   258         stdout, stderr = process.communicate()
   258         stderr = process.communicate()[1]
   259         if process.returncode:
   259         if process.returncode:
   260             e_msg = _(u'Failed to create mailboxes: %r\n') % mailboxes
   260             e_msg = _(u'Failed to create mailboxes: %r\n') % mailboxes
   261             raise VMMError(e_msg + stderr.strip(), VMM_ERROR)
   261             raise VMMError(e_msg + stderr.strip(), VMM_ERROR)
   262 
   262 
   263     def create(self):
   263     def create(self):