Skip to content

Commit

Permalink
wxGUI: fix exception when switching to mapset (#2999)
Browse files Browse the repository at this point in the history
Manual backport of 549dee5 from main.
  • Loading branch information
petrasovaa committed Jun 3, 2023
1 parent bbd4a43 commit 10d4b93
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gui/wxpython/datacatalog/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import os
import re
import copy
import time
from multiprocessing import Process, Queue, cpu_count

watchdog_used = True
Expand Down Expand Up @@ -168,6 +169,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 10d4b93

Please sign in to comment.