fix pep8 failures
This commit is contained in:
@@ -373,7 +373,7 @@ def main(argv=None):
|
||||
|
||||
# Create the RPC caller
|
||||
method = {'method': method_info[0],
|
||||
'args': dict([(method_info[i], method_info[i+1])
|
||||
'args': dict([(method_info[i], method_info[i + 1])
|
||||
for i in range(1, len(method_info), 2)])}
|
||||
my_caller = my_connection.create_caller(method,
|
||||
"my-source-address",
|
||||
|
||||
@@ -424,8 +424,6 @@ class Connection(Endpoint):
|
||||
self._pn_sasl = None
|
||||
self._pn_ssl = None
|
||||
|
||||
_REMOTE_REQ = (proton.Endpoint.LOCAL_UNINIT
|
||||
| proton.Endpoint.REMOTE_ACTIVE)
|
||||
_CLOSED = (proton.Endpoint.LOCAL_CLOSED | proton.Endpoint.REMOTE_CLOSED)
|
||||
_ACTIVE = (proton.Endpoint.LOCAL_ACTIVE | proton.Endpoint.REMOTE_ACTIVE)
|
||||
|
||||
|
||||
@@ -188,15 +188,15 @@ class _Link(Endpoint):
|
||||
def active(self):
|
||||
state = self._pn_link.state
|
||||
return (not self._failed and
|
||||
state == (proton.Endpoint.LOCAL_ACTIVE
|
||||
| proton.Endpoint.REMOTE_ACTIVE))
|
||||
state == (proton.Endpoint.LOCAL_ACTIVE |
|
||||
proton.Endpoint.REMOTE_ACTIVE))
|
||||
|
||||
@property
|
||||
def closed(self):
|
||||
state = self._pn_link.state
|
||||
return (self._failed or
|
||||
state == (proton.Endpoint.LOCAL_CLOSED
|
||||
| proton.Endpoint.REMOTE_CLOSED))
|
||||
state == (proton.Endpoint.LOCAL_CLOSED |
|
||||
proton.Endpoint.REMOTE_CLOSED))
|
||||
|
||||
def reject(self, pn_condition):
|
||||
self._rejected = True # prevent 'active' callback!
|
||||
|
||||
@@ -201,8 +201,8 @@ class APITest(common.Test):
|
||||
assert c1_events.remote_closed_ct == 0
|
||||
c2.close()
|
||||
common.process_connections(c1, c2)
|
||||
assert (c1_events.remote_closed_ct == 1
|
||||
and c2_events.remote_closed_ct == 0)
|
||||
assert (c1_events.remote_closed_ct == 1 and
|
||||
c2_events.remote_closed_ct == 0)
|
||||
assert c1_events.closed_ct == 0 and c2_events.closed_ct == 0
|
||||
assert not c1.active and not c2.active
|
||||
c1.close()
|
||||
|
||||
Reference in New Issue
Block a user