kalong 0.5.5__py3-none-any.whl → 0.5.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
kalong/__init__.py CHANGED
@@ -1,6 +1,6 @@
1
1
  """A new take on debugging"""
2
2
 
3
- __version__ = "0.5.5"
3
+ __version__ = "0.5.7"
4
4
  import os
5
5
  import sys
6
6
  from pathlib import Path
kalong/server.py CHANGED
@@ -141,6 +141,9 @@ def serve():
141
141
  app.on_shutdown.append(shutdown)
142
142
  app.router.add_get(r"/{side:(front|back)}/{origin}", websocket)
143
143
  app.router.add_static("/assets/", Path(__file__).parent / "static" / "assets")
144
- loop = asyncio.get_event_loop()
144
+ try:
145
+ loop = asyncio.get_event_loop()
146
+ except RuntimeError:
147
+ loop = asyncio.new_event_loop()
145
148
  loop.set_exception_handler(exception_handler)
146
149
  web.run_app(app, host=config.host, port=config.port, print=False, loop=loop)