mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 05:01: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,
|
command_list,
|
||||||
universal_newlines=True,
|
universal_newlines=True,
|
||||||
stdout=self.stdout_file,
|
stdout=self.stdout_file,
|
||||||
stderr=self.stdout_file,
|
stderr=subprocess.PIPE,
|
||||||
env=env,
|
env=env,
|
||||||
shell=(sys.platform == "win32")
|
shell=(sys.platform == "win32")
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -377,6 +377,7 @@ class DiffWindow(Gtk.Window):
|
|||||||
error_text = _(
|
error_text = _(
|
||||||
"The ndiff process terminated with status code %d."
|
"The ndiff process terminated with status code %d."
|
||||||
) % status
|
) % status
|
||||||
|
if self.ndiff_process.stderr:
|
||||||
stderr = self.ndiff_process.stderr.read()
|
stderr = self.ndiff_process.stderr.read()
|
||||||
if len(stderr) > 0:
|
if len(stderr) > 0:
|
||||||
error_text += "\n\n" + stderr
|
error_text += "\n\n" + stderr
|
||||||
|
|||||||
Reference in New Issue
Block a user