mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 08:46:45 +00:00
Fix #2854: crash if Ndiff exits with error status
This commit is contained in:
parent
453f9a7e25
commit
b6e67f834c
2 changed files with 5 additions and 4 deletions
|
|
@ -133,7 +133,7 @@ class NdiffCommand(subprocess.Popen):
|
|||
command_list,
|
||||
universal_newlines=True,
|
||||
stdout=self.stdout_file,
|
||||
stderr=self.stdout_file,
|
||||
stderr=subprocess.PIPE,
|
||||
env=env,
|
||||
shell=(sys.platform == "win32")
|
||||
)
|
||||
|
|
|
|||
|
|
@ -377,9 +377,10 @@ class DiffWindow(Gtk.Window):
|
|||
error_text = _(
|
||||
"The ndiff process terminated with status code %d."
|
||||
) % status
|
||||
stderr = self.ndiff_process.stderr.read()
|
||||
if len(stderr) > 0:
|
||||
error_text += "\n\n" + stderr
|
||||
if self.ndiff_process.stderr:
|
||||
stderr = self.ndiff_process.stderr.read()
|
||||
if len(stderr) > 0:
|
||||
error_text += "\n\n" + stderr
|
||||
alert = HIGAlertDialog(
|
||||
message_format=_("Error running ndiff"),
|
||||
secondary_text=error_text)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue