mirror of
https://github.com/towalink/wgfrontend.git
synced 2025-04-19 00:45:15 +00:00
Improve logging for on_change_command execution
This commit is contained in:
parent
94b2053585
commit
038477b231
@ -4,6 +4,7 @@
|
||||
|
||||
import cherrypy
|
||||
import jinja2
|
||||
import logging
|
||||
import os
|
||||
import random
|
||||
import string
|
||||
@ -95,7 +96,9 @@ class WebApp():
|
||||
"""React on config changes"""
|
||||
on_change_command = self.cfg.on_change_command
|
||||
if (on_change_command is not None) and (len(on_change_command) > 0):
|
||||
subprocess.call(on_change_command, shell=True)
|
||||
returncode = subprocess.call(on_change_command, shell=True)
|
||||
if returncode != 0:
|
||||
cherrypy.log('Error calling on_change_command', context='WEBAPP', severity=logging.ERROR, traceback=False)
|
||||
|
||||
|
||||
def run_webapp(cfg):
|
||||
|
Loading…
x
Reference in New Issue
Block a user