import logging
logger = logging.getLogger(__name__)
-from .config import prefs
from pkg_resources import Requirement, resource_filename
+from . import config
+
def hostname(path): # get the hostname of current server
hnfile = open(path, 'r')
hn = re.search('^(\w*)\n*', hnfile.read()).group(1)
# resolve-domains defined in individual sections of the config take priority over global config
if not fqdn:
- fqdn = prefs['resolve-domains']
+ fqdn = config.prefs['resolve-domains']
if fqdn == 'ip':
return(ip)