mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 22:21:29 +00:00
Closes #342 by thebinarymutant: Fix semantic for python3
This commit is contained in:
@@ -253,7 +253,7 @@ class ScanChooser(HIGVBox):
|
||||
try:
|
||||
parser = NmapParser()
|
||||
parser.parse_file(file_chosen)
|
||||
except xml.sax.SAXParseException, e:
|
||||
except xml.sax.SAXParseException as e:
|
||||
alert = HIGAlertDialog(
|
||||
message_format='<b>%s</b>' % _('Error parsing file'),
|
||||
secondary_text=_(
|
||||
@@ -262,7 +262,7 @@ class ScanChooser(HIGVBox):
|
||||
alert.run()
|
||||
alert.destroy()
|
||||
return False
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
alert = HIGAlertDialog(
|
||||
message_format='<b>%s</b>' % _(
|
||||
'Cannot open selected file'),
|
||||
@@ -388,7 +388,7 @@ class DiffWindow(gtk.Window):
|
||||
else:
|
||||
try:
|
||||
self.ndiff_process = zenmapCore.Diff.ndiff(scan_a, scan_b)
|
||||
except OSError, e:
|
||||
except OSError as e:
|
||||
alert = HIGAlertDialog(
|
||||
message_format=_("Error running ndiff"),
|
||||
secondary_text=_(
|
||||
@@ -425,7 +425,7 @@ class DiffWindow(gtk.Window):
|
||||
# Successful completion.
|
||||
try:
|
||||
diff = self.ndiff_process.get_scan_diff()
|
||||
except zenmapCore.Diff.NdiffParseException, e:
|
||||
except zenmapCore.Diff.NdiffParseException as e:
|
||||
alert = HIGAlertDialog(
|
||||
message_format=_("Error parsing ndiff output"),
|
||||
secondary_text=str(e))
|
||||
|
||||
Reference in New Issue
Block a user