Woops, do a proper check here.

This commit is contained in:
Ammar Askar committed 2012-10-26 18:52:14 +05:00
1 parent 08575e20b7
commit c503e06d33
1 file changed
+1 -1
+1 -1
View File
@@ -328,7 +328,7 @@ class PacketListener(threading.Thread):
elif(response == "\xFF"): elif(response == "\xFF"):
packet = PacketListenerManager.handleFF(self.FileObject) packet = PacketListenerManager.handleFF(self.FileObject)
print "Disconnected: " + packet['Reason'] print "Disconnected: " + packet['Reason']
if(f != None): if(self.connection.options != None and self.connection.options.dumpPackets):
f.close() f.close()
self.connection.disconnect() self.connection.disconnect()
sys.exit(1) sys.exit(1)