kopia lustrzana https://github.com/jupyterhub/repo2docker
call close_handlers before garbage collection
avoids bug when this is called by `Application.__del__`pull/1380/head
rodzic
8a6eb6b19e
commit
4b33d0f395
|
@ -482,6 +482,15 @@ def main():
|
||||||
if r2d.log_level == logging.DEBUG:
|
if r2d.log_level == logging.DEBUG:
|
||||||
r2d.log.exception(e)
|
r2d.log.exception(e)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
finally:
|
||||||
|
# workaround bug in traitlets Application.__del__:
|
||||||
|
# https://github.com/ipython/traitlets/pull/912
|
||||||
|
# make sure close_handlers is called before process teardown
|
||||||
|
try:
|
||||||
|
r2d.close_handlers()
|
||||||
|
except AttributeError:
|
||||||
|
# traitlets < 5.10
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Ładowanie…
Reference in New Issue