(reason="Unknown")
| 12 | last_error = None |
| 13 | |
| 14 | def shutdown(reason="Unknown"): |
| 15 | logging.info("Shutting down (reason: %s)..." % reason) |
| 16 | import main |
| 17 | if "file_server" in dir(main): |
| 18 | try: |
| 19 | gevent.spawn(main.file_server.stop) |
| 20 | if "ui_server" in dir(main): |
| 21 | gevent.spawn(main.ui_server.stop) |
| 22 | except Exception as err: |
| 23 | print("Proper shutdown error: %s" % err) |
| 24 | sys.exit(0) |
| 25 | else: |
| 26 | sys.exit(0) |
| 27 | |
| 28 | # Store last error, ignore notify, allow manual error logging |
| 29 | def handleError(*args, **kwargs): |
no outgoing calls
no test coverage detected