From b19b9430a1a0feefc2ad855e8d494a9ffad81817 Mon Sep 17 00:00:00 2001 From: Liam Young Date: Sat, 15 Nov 2014 09:32:03 -0600 Subject: [PATCH] Remove mutable method default --- hooks/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hooks/utils.py b/hooks/utils.py index b8e16623..dc4a9379 100644 --- a/hooks/utils.py +++ b/hooks/utils.py @@ -49,8 +49,10 @@ def enable_pocket(pocket): sources.write(line) -def get_host_ip(hostname=unit_get('private-address')): +def get_host_ip(hostname=None): try: + if not hostname: + hostname=unit_get('private-address') # Test to see if already an IPv4 address socket.inet_aton(hostname) return hostname