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