Skip to content

Commit

Permalink
- Removed debugging print() call
Browse files Browse the repository at this point in the history
- Added ConnectionResetError to automatic error handler code
  • Loading branch information
gingershaped committed Aug 23, 2022
1 parent 45df375 commit f597631
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sechat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def run(self):
data = self.socket.recv()
except websocket.WebSocketTimeoutException:
continue
except websocket.WebSocketConnectionClosedException:
except (websocket.WebSocketConnectionClosedException, ConnectionResetError):
self.logger.warning("Connection closed, attempting to reconnect")
self.connect()
except Exception as e:
Expand Down Expand Up @@ -637,7 +637,6 @@ def login(self, email, password, host="codegolf.stackexchange.com"):
"html.parser"
)
self.fkey = r.find(id="content").form.find("input", attrs={"name": "fkey"})["value"]
print(r.find(class_="topbar-menu-links").find("a")["href"].split("/")[2])
try:
self.userID = int(r.find(class_="topbar-menu-links").find("a")["href"].split("/")[2])
except ValueError:
Expand Down

0 comments on commit f597631

Please sign in to comment.