mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Fix #2854: crash if Ndiff exits with error status
This commit is contained in:
@@ -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,6 +377,7 @@ class DiffWindow(Gtk.Window):
|
||||
error_text = _(
|
||||
"The ndiff process terminated with status code %d."
|
||||
) % status
|
||||
if self.ndiff_process.stderr:
|
||||
stderr = self.ndiff_process.stderr.read()
|
||||
if len(stderr) > 0:
|
||||
error_text += "\n\n" + stderr
|
||||
|
||||
Reference in New Issue
Block a user