Skip to content

Commit

Permalink
wxGUI: fix exception when switching to mapset (OSGeo#2994)
Browse files Browse the repository at this point in the history
  • Loading branch information
lindakarlovska authored and neteler committed Nov 7, 2023
1 parent e1f10ed commit 81ece6d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gui/wxpython/core/watchdog.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"""

import os
import time

watchdog_used = True
try:
Expand Down Expand Up @@ -63,6 +64,8 @@ def on_modified(self, event):
if timestamp - self.modified_time < 0.5:
return
self.modified_time = timestamp
# wait to make sure file writing is done
time.sleep(0.1)
with open(event.src_path, "r") as f:
gisrc = {}
for line in f.readlines():
Expand Down

0 comments on commit 81ece6d

Please sign in to comment.