From 82be54a353c0e60ead151a268ebc801dcd92001a Mon Sep 17 00:00:00 2001 From: dmiller Date: Sun, 1 Nov 2020 03:24:17 +0000 Subject: [PATCH] Convert exception to string first; Fixes #2157 --- CHANGELOG | 3 +++ zenmap/zenmapGUI/ScanInterface.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 617c27b1d..18c201659 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,8 @@ #Nmap Changelog ($Id$); -*-text-*- +o [Zenmap][GH#2157] Fixed an issue where a failure to execute Nmap would result + in a Zenmap crash with "TypeError: coercing to Unicode" exception. + o Nmap no longer considers an ICMP Host Unreachable as confirmation that a target is down, in accordance with RFC 1122 which says these errors may be transient. Instead, the probe will be destroyed and other probes used to diff --git a/zenmap/zenmapGUI/ScanInterface.py b/zenmap/zenmapGUI/ScanInterface.py index 0c4bdaa7a..876d7110e 100644 --- a/zenmap/zenmapGUI/ScanInterface.py +++ b/zenmap/zenmapGUI/ScanInterface.py @@ -513,7 +513,7 @@ class ScanInterface(HIGVBox): except Exception, e: warn_dialog = HIGAlertDialog( message_format=_("Error executing command"), - secondary_text=unicode(e, errors='replace'), + secondary_text=unicode(str(e), errors='replace'), type=gtk.MESSAGE_ERROR) warn_dialog.run() warn_dialog.destroy()