Error if no peer connection found

This commit is contained in:
shortcutme 2017-06-13 14:12:48 +02:00
parent a4a23f3ea0
commit ae21f056d5
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -127,6 +127,8 @@ class Peer(object):
for retry in range(1, 4): # Retry 3 times
try:
if not self.connection:
raise Exception("No connection found")
res = self.connection.request(cmd, params, stream_to)
if not res:
raise Exception("Send error")