This commit is contained in:
VirtuBox
2019-09-02 18:56:34 +02:00
parent 4a849cabe2
commit 3f1f08998c
10 changed files with 54 additions and 31 deletions

View File

@@ -49,9 +49,9 @@ class LogWatcher(object):
# assert (os.path.isdir(self.folder), "%s does not exists"
# % self.folder)
for file in self.filelist:
assert (os.path.isfile(file))
assert callable(callback)
self.update_files()
if not os.path.isfile(file):
if not callable(callback):
self.update_files()
# The first time we run the script we move all file markers at EOF.
# In case of files created afterwards we don't do this.
for id, file in list(iter(self.files_map.items())):