Commit 94276e4f authored by Denis Bilenko's avatar Denis Bilenko

socket: fix potential AttributeError in str/repr

parent 4cb31312
......@@ -309,7 +309,7 @@ class socket(object):
result += ' sock=' + str(sockname)
if peername is not None:
result += ' peer=' + str(peername)
if self.timeout is not None:
if getattr(self, 'timeout', None) is not None:
result += ' timeout=' + str(self.timeout)
return result
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment