Only re-enable faulthandler when stderr is available
This commit is contained in:
parent
d1b947279e
commit
267552fe77
@ -643,7 +643,10 @@ class QuteBrowser(QApplication):
|
||||
self._maybe_quit('networkmanager')
|
||||
if self._crashlogfile is not None:
|
||||
# Re-enable faulthandler to stdout, then remove crash log
|
||||
faulthandler.enable()
|
||||
if sys.stderr is not None:
|
||||
faulthandler.enable()
|
||||
else:
|
||||
faulthandler.disable()
|
||||
self._crashlogfile.close()
|
||||
try:
|
||||
os.remove(self._crashlogfile.name)
|
||||
|
Loading…
Reference in New Issue
Block a user