import watchdog only when is needed

This commit is contained in:
Jonathan Baecker 2019-06-07 10:16:39 +02:00
parent 9fb58a4b48
commit 27d8f51099

View File

@ -41,9 +41,6 @@ from subprocess import PIPE, CalledProcessError, Popen, check_output
from threading import Thread
from types import SimpleNamespace
from watchdog.events import PatternMatchingEventHandler
from watchdog.observers import Observer
# ------------------------------------------------------------------------------
# read variables from config file
# ------------------------------------------------------------------------------
@ -1091,4 +1088,8 @@ def main():
if __name__ == '__main__':
if not _general.playlist_mode:
from watchdog.events import PatternMatchingEventHandler
from watchdog.observers import Observer
main()