Skip to content

Update deps to latest supported & minor cleanup #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Reverted some of the other styling changes
  • Loading branch information
BelleNottelling committed Feb 2, 2024
commit e6b0465305f392951b0d68f6c45235803c7fc16b
8 changes: 2 additions & 6 deletions switchedrelay.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ def send_message(socket):
except:
pass

loop.add_callback(
functools.partial(send_message, socket)
)
loop.add_callback(functools.partial(send_message, socket))

elif macmap.get(mac, False):

Expand All @@ -102,9 +100,7 @@ def send_message():
class MainHandler(websocket.WebSocketHandler):
def __init__(self, *args, **kwargs):
super(MainHandler, self).__init__(*args, **kwargs)
self.remote_ip = self.request.headers.get(
"X-Forwarded-For", self.request.remote_ip
)
self.remote_ip = self.request.headers.get("X-Forwarded-For", self.request.remote_ip)
logger.info("%s: connected." % self.remote_ip)
self.thread = None
self.mac = ""
Expand Down