From cab86871fe5e6dd539417bcb24fa6d284cdd0163 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 25 Jan 2011 11:02:41 +0000 Subject: [PATCH] fix for a bug reported by mhackmail@gmail.com (local variable 'code' referenced before assignment) --- doc/THANKS | 3 +++ lib/request/connect.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/THANKS b/doc/THANKS index aa87802e6..0a423007b 100644 --- a/doc/THANKS +++ b/doc/THANKS @@ -368,6 +368,9 @@ Alessandro Tanasi Andres Tarasco for providing me with good feedback +Kazim Bugra Tombul + for reporting a minor bug + Efrain Torres for helping me out to improve the Metasploit Framework 3 sqlmap auxiliary module and for commiting it on the Metasploit official diff --git a/lib/request/connect.py b/lib/request/connect.py index f11b77885..94b79c1b7 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -259,7 +259,7 @@ class Connect: page = decodePage(page, responseHeaders.get("Content-Encoding"), responseHeaders.get("Content-Type")) except socket.timeout: warnMsg = "connection timed out while trying " - warnMsg += "to get error page information (%d)" % code + warnMsg += "to get error page information (%d)" % e.code logger.warn(warnMsg) return None, None except: