flake8 cleanup of fauxmo
This commit is contained in:
parent
38fcf3fbae
commit
0e534d8d9d
|
@ -33,11 +33,8 @@ import socket
|
||||||
import struct
|
import struct
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
import urllib
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# This XML is the minimum needed to define one of our virtual switches
|
# This XML is the minimum needed to define one of our virtual switches
|
||||||
# to the Amazon Echo
|
# to the Amazon Echo
|
||||||
|
|
||||||
|
@ -57,6 +54,7 @@ SETUP_XML = """<?xml version="1.0"?>
|
||||||
|
|
||||||
DEBUG = False
|
DEBUG = False
|
||||||
|
|
||||||
|
|
||||||
def dbg(msg):
|
def dbg(msg):
|
||||||
global DEBUG
|
global DEBUG
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
|
@ -124,7 +122,6 @@ class upnp_device(object):
|
||||||
dbg("got local address of %s" % upnp_device.this_host_ip)
|
dbg("got local address of %s" % upnp_device.this_host_ip)
|
||||||
return upnp_device.this_host_ip
|
return upnp_device.this_host_ip
|
||||||
|
|
||||||
|
|
||||||
def __init__(self, listener, poller, port, root_url, server_version, persistent_uuid, other_headers=None, ip_address=None):
|
def __init__(self, listener, poller, port, root_url, server_version, persistent_uuid, other_headers=None, ip_address=None):
|
||||||
self.listener = listener
|
self.listener = listener
|
||||||
self.poller = poller
|
self.poller = poller
|
||||||
|
@ -193,7 +190,7 @@ class upnp_device(object):
|
||||||
temp_socket.sendto(message, destination)
|
temp_socket.sendto(message, destination)
|
||||||
|
|
||||||
|
|
||||||
# This subclass does the bulk of the work to mimic a WeMo switch on the network.
|
# This subclass does the bulk of the work to mimic a WeMo switch on the network
|
||||||
|
|
||||||
class fauxmo(upnp_device):
|
class fauxmo(upnp_device):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -420,4 +417,3 @@ while True:
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
dbg(e)
|
dbg(e)
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user