mirror of
https://github.com/spl0k/supysonic.git
synced 2024-12-22 08:56:17 +00:00
Fixed issues when the watcher is set to log to /dev/null
This commit is contained in:
parent
c0d9d616c8
commit
e2cc51a0f0
@ -253,7 +253,10 @@ class SupysonicWatcher(object):
|
||||
|
||||
def run(self):
|
||||
if self.__config.DAEMON['log_file']:
|
||||
log_handler = TimedRotatingFileHandler(self.__config.DAEMON['log_file'], when = 'midnight')
|
||||
if self.__config.DAEMON['log_file'] == '/dev/null':
|
||||
log_handler = logging.NullHandler()
|
||||
else:
|
||||
log_handler = TimedRotatingFileHandler(self.__config.DAEMON['log_file'], when = 'midnight')
|
||||
log_handler.setFormatter(logging.Formatter("%(asctime)s [%(levelname)s] %(message)s"))
|
||||
else:
|
||||
log_handler = logging.StreamHandler()
|
||||
|
@ -83,7 +83,7 @@ class FolderTestCase(FrontendTestBase):
|
||||
with db_session:
|
||||
folder = Folder(
|
||||
name = 'folder',
|
||||
path = 'tests/assets',
|
||||
path = 'tests/assets/folder',
|
||||
root = True,
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user