Skip to content
Browse files

Prevent error when the attribute is not available (eg while waiting f…

…or the socket)
  • Loading branch information...
1 parent 854d4e6 commit a6ae875f437e32d6b0f1af4107c0459f6fa7ecc3 @vacmf vacmf committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/cuckoo/common/utils.py
View
2 lib/cuckoo/common/utils.py
@@ -104,7 +104,7 @@ def _set_timeout(self, timeout):
t = self._ServerProxy__transport
t.timeout = timeout
# if we still have a socket we need to update that as well
- if t._connection[1] and t._connection[1].sock:
+ if hasattr(t, '_connection') and t._connection[1] and t._connection[1].sock:
t._connection[1].sock.settimeout(timeout)
class TimeoutTransport(xmlrpclib.Transport):

0 comments on commit a6ae875

Please sign in to comment.
Something went wrong with that request. Please try again.