move _get_version

This commit is contained in:
Brad Warren 2017-08-23 15:13:06 -07:00
parent c9813a44d7
commit d1f3a2deef

View file

@ -146,6 +146,19 @@ class Installer(plugins_common.Plugin):
# - Built-in support for TLS management and DANE added, see:
# http://www.postfix.org/postfix-tls.1.html
def _get_version(self):
"""Return the mail version of Postfix.
Version is returned as a tuple. (e.g. '2.11.3' is (2, 11, 3))
:returns: version
:rtype: tuple
:raises .PluginError: Unable to find Postfix version.
"""
mail_version = self.get_config_var("mail_version", default=True)
return tuple(int(i) for i in mail_version.split('.'))
def find_postfix_cf(self):
"Search far and wide for the correct postfix configuration file"
@ -242,20 +255,6 @@ class Installer(plugins_common.Plugin):
# https://github.com/letsencrypt/letsencrypt/blob/master/letsencrypt/plugins/common.py#L35
def _get_version(self):
"""Return the mail version of Postfix.
Version is returned as a tuple. (e.g. '2.11.3' is (2, 11, 3))
:returns: version
:rtype: tuple
:raises .PluginError: Unable to find Postfix version.
"""
mail_version = self.get_config_var("mail_version", default=True)
return tuple(int(i) for i in mail_version.split('.'))
def more_info(self):
"""Human-readable string to help the user.
Should describe the steps taken and any relevant info to help the user