mirror of
https://github.com/Gallopsled/pwntools.git
synced 2026-11-07 17:14:22 -10:00
cleaned code up a bit
This commit is contained in:
1 parent
1a8090d29e
commit
023b7baf47
2 files changed
+2
-5
No files matched your search
@@ -65,8 +65,8 @@ class sock(tube):
|
||||
raise
|
||||
|
||||
def settimeout_raw(self, timeout):
|
||||
if hasattr(self, 'sock'):
|
||||
self.sock and self.sock.settimeout(timeout)
|
||||
if hasattr(self, 'sock', False) and self.sock:
|
||||
self.sock.settimeout(timeout)
|
||||
|
||||
def can_recv_raw(self, timeout):
|
||||
if not self.sock or self.closed["recv"]:
|
||||
|
||||
@@ -21,9 +21,6 @@ class tube(Timeout):
|
||||
newline = '\n'
|
||||
|
||||
def __init__(self, timeout = default):
|
||||
# assert type(self) == tube
|
||||
|
||||
# assert isinstance(self, tube), (id(type(self)), id(tube))
|
||||
super(tube, self).__init__(timeout)
|
||||
self.buffer = Buffer()
|
||||
atexit.register(self.close)
|
||||
|
||||
Reference in new issue
Block a user