catch AttributeError in exit()

This commit is contained in:
Michel Oosterhof
2015-12-29 12:22:37 +00:00
parent 2e9b846c3f
commit 0dcd4c2091

View File

@@ -80,9 +80,12 @@ class HoneyPotCommand(object):
"""
Sometimes client is disconnected and command exits after. So cmdstack is gone
"""
if self.protocol.cmdstack:
try:
self.protocol.cmdstack.pop()
self.protocol.cmdstack[-1].resume()
except AttributeError:
# cmdstack could be gone already (wget + disconnect)
pass
def handle_CTRL_C(self):