Skip to content
Snippets Groups Projects
Commit 13faaa70 authored by Manuela Kuhn's avatar Manuela Kuhn
Browse files

Remove file from observation list if WindowsError occurs

parent 123b6687
No related branches found
No related tags found
No related merge requests found
......@@ -276,6 +276,13 @@ class checkModTime (threading.Thread):
try:
# check modification time
timeLastModified = os.stat(filepath).st_mtime
except WindowsError:
self.log.error("Unable to get modification time for file: " + filepath, exc_info=True)
# remove the file from the observing list
self.lock.acquire()
eventListToObserveTmp.append(filepath)
self.lock.release()
return
except:
self.log.error("Unable to get modification time for file: " + filepath, exc_info=True)
return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment