mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
fix exit code 120 when quitting in python 3.6
This commit is contained in:
parent
294813f4fd
commit
90f7038109
2 changed files with 7 additions and 0 deletions
|
@ -27,8 +27,13 @@ class ErrorHandler(QObject):
|
|||
self.timer = None
|
||||
self.errorTimer.connect(self._setTimer)
|
||||
self.pool = ""
|
||||
self._oldstderr = sys.stderr
|
||||
sys.stderr = self
|
||||
|
||||
def unload(self):
|
||||
sys.stderr = self._oldstderr
|
||||
sys.excepthook = None
|
||||
|
||||
def write(self, data):
|
||||
# dump to stdout
|
||||
sys.stdout.write(data)
|
||||
|
|
|
@ -249,6 +249,8 @@ To import into a password protected profile, please open the profile before atte
|
|||
self.hide()
|
||||
if browser:
|
||||
self.showProfileManager()
|
||||
else:
|
||||
self.errorHandler.unload()
|
||||
|
||||
# Collection load/unload
|
||||
##########################################################################
|
||||
|
|
Loading…
Reference in a new issue