VirtualMailManager/ext/postconf.py
branchv0.6.x
changeset 422 33a45e4c80c4
parent 417 8209da83e256
child 568 14abdd04ddf5
equal deleted inserted replaced
421:ff2a61e155db 422:33a45e4c80c4
    48           the name of a Postfix configuration parameter
    48           the name of a Postfix configuration parameter
    49         `value` : str
    49         `value` : str
    50           the parameter's new value.
    50           the parameter's new value.
    51         """
    51         """
    52         self._check_parameter(parameter)
    52         self._check_parameter(parameter)
    53         stdout, stderr = Popen((self._bin, '-e', parameter + '=' + str(value)),
    53         stderr = Popen((self._bin, '-e', parameter + '=' + str(value)),
    54                                stderr=PIPE).communicate()
    54                        stderr=PIPE).communicate()[1]
    55         if stderr:
    55         if stderr:
    56             raise VMMError(stderr.strip(), VMM_ERROR)
    56             raise VMMError(stderr.strip(), VMM_ERROR)
    57 
    57 
    58     def read(self, parameter, expand_vars=True):
    58     def read(self, parameter, expand_vars=True):
    59         """Returns the parameters value.
    59         """Returns the parameters value.