Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def local_ip_address():
if not upnp_device.this_host_ip:
temp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
try:
temp_socket.connect(('8.8.8.8', 53))
upnp_device.this_host_ip = temp_socket.getsockname()[0]
except:
upnp_device.this_host_ip = '127.0.0.1'
del(temp_socket)
dbg("got local address of %s" % upnp_device.this_host_ip)
return upnp_device.this_host_ip
def local_ip_address():
if not upnp_device.this_host_ip:
temp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
try:
temp_socket.connect(('8.8.8.8', 53))
upnp_device.this_host_ip = temp_socket.getsockname()[0]
except:
upnp_device.this_host_ip = '127.0.0.1'
del(temp_socket)
# self.LogInfo("got local address of %s" % upnp_device.this_host_ip)
return upnp_device.this_host_ip
def local_ip_address():
if not upnp_device.this_host_ip:
temp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
try:
temp_socket.connect(('8.8.8.8', 53))
upnp_device.this_host_ip = temp_socket.getsockname()[0]
except:
upnp_device.this_host_ip = '127.0.0.1'
del(temp_socket)
dbg("got local address of %s" % upnp_device.this_host_ip)
return upnp_device.this_host_ip
def local_ip_address():
if not upnp_device.this_host_ip:
temp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
try:
temp_socket.connect(('8.8.8.8', 53))
upnp_device.this_host_ip = temp_socket.getsockname()[0]
except:
upnp_device.this_host_ip = '127.0.0.1'
del(temp_socket)
dbg("got local address of %s" % upnp_device.this_host_ip)
return upnp_device.this_host_ip
@staticmethod
def local_ip_address():
if not upnp_device.this_host_ip:
temp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
try:
temp_socket.connect(('8.8.8.8', 53))
upnp_device.this_host_ip = temp_socket.getsockname()[0]
except:
upnp_device.this_host_ip = '127.0.0.1'
del(temp_socket)
dbg("got local address of %s" % upnp_device.this_host_ip)
return upnp_device.this_host_ip
@staticmethod
def local_ip_address():
if not upnp_device.this_host_ip:
temp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
try:
temp_socket.connect(('8.8.8.8', 53))
upnp_device.this_host_ip = temp_socket.getsockname()[0]
except:
upnp_device.this_host_ip = '127.0.0.1'
del(temp_socket)
dbg("got local address of %s" % upnp_device.this_host_ip)
return upnp_device.this_host_ip
def local_ip_address():
if not upnp_device.this_host_ip:
temp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
try:
temp_socket.connect(('8.8.8.8', 53))
upnp_device.this_host_ip = temp_socket.getsockname()[0]
except:
upnp_device.this_host_ip = '127.0.0.1'
del(temp_socket)
# self.LogInfo("got local address of %s" % upnp_device.this_host_ip)
return upnp_device.this_host_ip
@staticmethod
def local_ip_address():
if not upnp_device.this_host_ip:
temp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
try:
temp_socket.connect(('8.8.8.8', 53))
upnp_device.this_host_ip = temp_socket.getsockname()[0]
except:
upnp_device.this_host_ip = '127.0.0.1'
del(temp_socket)
dbg("got local address of %s" % upnp_device.this_host_ip)
return upnp_device.this_host_ip
def local_ip_address():
if not upnp_device.this_host_ip:
temp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
try:
temp_socket.connect(('8.8.8.8', 53))
upnp_device.this_host_ip = temp_socket.getsockname()[0]
except:
upnp_device.this_host_ip = '127.0.0.1'
del(temp_socket)
# self.LogInfo("got local address of %s" % upnp_device.this_host_ip)
return upnp_device.this_host_ip
def local_ip_address():
if not upnp_device.this_host_ip:
temp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
try:
temp_socket.connect(('8.8.8.8', 53))
upnp_device.this_host_ip = temp_socket.getsockname()[0]
except:
upnp_device.this_host_ip = '127.0.0.1'
del(temp_socket)
# self.LogInfo("got local address of %s" % upnp_device.this_host_ip)
return upnp_device.this_host_ip