From 21a7d38002d4a903f02f196d4a445208b6e02ea2 Mon Sep 17 00:00:00 2001 From: Joseph Coffland Date: Mon, 6 Apr 2020 22:20:18 -0700 Subject: [PATCH] Formatting --- fah/Client.py | 10 ++++------ fah/Connection.py | 4 +++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fah/Client.py b/fah/Client.py index 6197d22..b64bb6c 100644 --- a/fah/Client.py +++ b/fah/Client.py @@ -316,8 +316,7 @@ class Client: self.error_messages.add(msg) app.error(msg) - else: - print ('ERROR: %s' % msg) + else: print('ERROR: %s' % msg) app.set_status(msg) @@ -327,8 +326,7 @@ class Client: def process_message(self, app, type, data): - if debug: - print ('message: %s %s' % (type, data)) + if debug: print('message: %s %s' % (type, data)) if type == 'heartbeat': return if type == 'ppd': self.process_ppd(app, data) @@ -361,7 +359,7 @@ class Client: self.conn.messages = [] except Exception as e: - print (e) + print(e) # If client status has changed update UI newStatus = self.get_status() @@ -401,6 +399,6 @@ class Client: self.conn.write_some() except Exception as e: - print (e) + print(e) self.conn.close() diff --git a/fah/Connection.py b/fah/Connection.py index b50f805..740845d 100644 --- a/fah/Connection.py +++ b/fah/Connection.py @@ -37,6 +37,7 @@ if sys.platform == 'win32': debug = False WSAEWOULDBLOCK = 10035 + class Connection: def __init__(self, address = 'localhost', port = 36330, password = None, retry_rate = 5): @@ -218,7 +219,8 @@ class Connection: if len(tokens) < 3: self.readBuf = self.readBuf[eol:] - raise Exception('Invalid PyON line: ' + line.encode('string_escape')) + raise Exception('Invalid PyON line: ' + + line.encode('string_escape')) version = int(tokens[1]) type = tokens[2]