From 5a1aa5c88c7803566138cb3c7229de4dcf65c88f Mon Sep 17 00:00:00 2001 From: Ken Roberts Date: Mon, 13 Oct 2014 10:09:23 -0700 Subject: [PATCH] pep8 --- openlp/core/lib/projector/pjlink1.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openlp/core/lib/projector/pjlink1.py b/openlp/core/lib/projector/pjlink1.py index ae1d75c90..f4ed483be 100644 --- a/openlp/core/lib/projector/pjlink1.py +++ b/openlp/core/lib/projector/pjlink1.py @@ -76,6 +76,7 @@ class PJLink1(QTcpSocket): changeStatus = pyqtSignal(str, int, str) projectorNetwork = pyqtSignal(int) # Projector network activity projectorStatus = pyqtSignal(int) + projectorAuthentication = pyqtSignal(str) # Authentication error - str=self.name def __init__(self, name=None, ip=None, port=PJLINK_PORT, pin=None, *args, **kwargs): """ @@ -319,7 +320,7 @@ class PJLink1(QTcpSocket): if data.upper().startswith('PJLINK'): # Reconnected from remote host disconnect ? return self.check_login(data) - if not '=' in data: + if '=' not in data: log.warn('(%s) Invalid packet received' % self.ip) return data_split = data.split('=') @@ -379,7 +380,7 @@ class PJLink1(QTcpSocket): if sent == -1: # Network error? self.change_status(E_NETWORK, - translate('OpenLP.PJLink1', 'Error while sending data to projector')) + translate('OpenLP.PJLink1', 'Error while sending data to projector')) except SocketError as e: self.disconnect_from_host() self.changeStatus(E_NETWORK, '%s : %s' % (e.error(), e.errorString())) @@ -395,6 +396,7 @@ class PJLink1(QTcpSocket): # Authentication error self.disconnect_from_host() self.change_status(E_AUTHENTICATION) + self.projectorAuthentication.emit(self.name) return elif data.upper() == 'ERR1': # Undefined command