summaryrefslogtreecommitdiffstats
path: root/func/minion/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'func/minion/utils.py')
-rwxr-xr-xfunc/minion/utils.py5
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