Skip to content

Commit e0da484

Browse files
committed
Apply same idea to the update of RESOURCES and USERS in refresh_vgrid_map
as recently introduced for the `VGRIDS` update there. It appears to also solve the last remaining spurious test errors in CI for PR #372.
1 parent e0ac249 commit e0da484

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mig/shared/vgridaccess.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,8 @@ def refresh_vgrid_map(configuration, clean=False):
451451
conf_path = os.path.join(configuration.resource_home, res, "config")
452452
if not os.path.isfile(conf_path):
453453
continue
454-
if os.path.getmtime(conf_path) >= map_stamp:
454+
if res not in vgrid_map[RESOURCES] or \
455+
os.path.getmtime(conf_path) >= map_stamp:
455456
# Read maps of exe name to vgrid list and of store name to vgrid
456457
# list. Save them separately to be able to distinguish them in
457458
# exe / store access and visibility
@@ -562,7 +563,7 @@ def refresh_vgrid_map(configuration, clean=False):
562563
else:
563564
conf_mtime = -1
564565
user_conf = {}
565-
if conf_mtime >= map_stamp:
566+
if user not in vgrid_map[USERS] or conf_mtime >= map_stamp:
566567
vgrid_map[USERS][user] = user_conf
567568
vgrid_map[USERS][user][ASSIGN] = vgrid_map[USERS][user].get(ASSIGN,
568569
[])

0 commit comments

Comments
 (0)