Remove mutable method default

This commit is contained in:
Liam Young 2014-11-15 09:32:03 -06:00
parent 98593108a0
commit b19b9430a1

View File

@ -49,8 +49,10 @@ def enable_pocket(pocket):
sources.write(line) sources.write(line)
def get_host_ip(hostname=unit_get('private-address')): def get_host_ip(hostname=None):
try: try:
if not hostname:
hostname=unit_get('private-address')
# Test to see if already an IPv4 address # Test to see if already an IPv4 address
socket.inet_aton(hostname) socket.inet_aton(hostname)
return hostname return hostname