aboutsummaryrefslogtreecommitdiff
path: root/http2irc.py
diff options
context:
space:
mode:
authorGravatar JustAnotherArchivist2019-12-15 22:21:15 +0000
committerGravatar JustAnotherArchivist2019-12-15 22:21:15 +0000
commit8f069ccac1c9f26b5c7e5d09f205c6b8905fd243 (patch)
treef3bc9ea5222f74f3f61d9542688fd60704d23848 /http2irc.py
parentWait for connection registration before trying to join channels and send mess... (diff)
signature
Catch config errors on reload
Diffstat (limited to 'http2irc.py')
-rw-r--r--http2irc.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/http2irc.py b/http2irc.py
index cc06daf..825b409 100644
--- a/http2irc.py
+++ b/http2irc.py
@@ -447,7 +447,11 @@ async def main():
def sigusr1_callback():
logging.info('Got SIGUSR1, reloading config')
nonlocal config, irc, webserver
- newConfig = config.reread()
+ try:
+ newConfig = config.reread()
+ except InvalidConfig as e:
+ logging.error(f'Config reload failed: {e!s}')
+ return
config = newConfig
irc.update_config(config)
webserver.update_config(config)