Remove mutable method default

This commit is contained in:
Liam Young 2014-11-15 09:32:03 -06:00
parent 45ea91b852
commit ebcc7629c7
1 changed files with 3 additions and 1 deletions

View File

@ -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