summaryrefslogtreecommitdiff
path: root/src/core.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-04-02 18:30:06 +0200
committermathieui <mathieui@mathieui.net>2012-04-02 18:30:06 +0200
commit941acdb612061190fec341a78d5741c4ee0374e2 (patch)
treee2c649ba02b05802c38a1a92e3d75b8ed01c399d /src/core.py
parent4cf1acd9e4dce57cfeff246c7456a2eb1b818258 (diff)
downloadpoezio-941acdb612061190fec341a78d5741c4ee0374e2.tar.gz
poezio-941acdb612061190fec341a78d5741c4ee0374e2.tar.bz2
poezio-941acdb612061190fec341a78d5741c4ee0374e2.tar.xz
poezio-941acdb612061190fec341a78d5741c4ee0374e2.zip
Fixes #2350 (reloading static resources on SIGHUP)
Diffstat (limited to 'src/core.py')
-rw-r--r--src/core.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core.py b/src/core.py
index 79417c92..eb7d9e89 100644
--- a/src/core.py
+++ b/src/core.py
@@ -214,6 +214,21 @@ class Core(object):
self.pending_invites = {}
+ def sighup_handler(self, num, stack):
+ log.debug("SIGHUP caught, reloading the files…")
+ # reload all log files
+ log.debug("Reloading the log files…")
+ logger.reload_all()
+ log.debug("Log files reloaded.")
+ # reload the theme
+ log.debug("Reloading the theme…")
+ self.command_theme("")
+ log.debug("Theme reloaded.")
+ # reload the config from the disk
+ log.debug("Reloading the config…")
+ config.__init__(config.file_name)
+ log.debug("Config reloaded.")
+
def autoload_plugins(self):
plugins = config.get('plugins_autoload', '')
for plugin in plugins.split():