mirror of
https://github.com/kuitoi/kuitoi-Server.git
synced 2026-04-15 14:47:31 +00:00
New except
This commit is contained in:
@@ -152,7 +152,9 @@ class TCPServer:
|
||||
# TODO: i18n
|
||||
self.log.error("Cannot bind port")
|
||||
raise e
|
||||
except BaseException as e:
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
except Exception as e:
|
||||
self.log.error(f"Error: {e}")
|
||||
raise e
|
||||
finally:
|
||||
|
||||
@@ -14,17 +14,13 @@ parser.add_argument('-v', '--version', action="store_true", help='Print version
|
||||
parser.add_argument('--config', help='Patch to config file.', nargs='?', default=None, type=str)
|
||||
parser.add_argument('--language', help='Setting localisation.', nargs='?', default=None, type=str)
|
||||
|
||||
run = True
|
||||
|
||||
|
||||
def main():
|
||||
from core import Core
|
||||
core = Core()
|
||||
try:
|
||||
core.start()
|
||||
Core().start()
|
||||
except KeyboardInterrupt:
|
||||
core.run = False
|
||||
core.stop()
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user