diff options
Diffstat (limited to 'func/minion/utils.py')
-rwxr-xr-x | func/minion/utils.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/func/minion/utils.py b/func/minion/utils.py index 7599657..723bd85 100755 --- a/func/minion/utils.py +++ b/func/minion/utils.py @@ -37,7 +37,10 @@ def get_hostname(): # for the certmaster for now hostname = None hostname = socket.gethostname() - ip = socket.gethostbyname(hostname) + try: + ip = socket.gethostbyname(hostname) + except: + return hostname if ip != "127.0.0.1": return hostname |