Formatting
This commit is contained in:
parent
db1f845d0c
commit
21a7d38002
|
@ -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()
|
||||
|
|
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue