Skip to content

Commit

Permalink
Fix repetition of keys in platform_map
Browse files Browse the repository at this point in the history
  • Loading branch information
bfloch committed Nov 4, 2019
1 parent 76f3deb commit f1ec2d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/rez/tests/data/config/test_conditional.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

platform_map = {
"arch": {
".*": "IMPOSSIBLE_ARCH",
"^.*$": "IMPOSSIBLE_ARCH",
},
}

Expand Down
4 changes: 2 additions & 2 deletions src/rez/utils/platform_.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def _platform_mapped(self, key, value):
# The function name is used as primary key
entry = platform_map.get(key)
if entry:
for key, value in entry.items():
value, changes = re.subn(key, value, value)
for key, map_value in entry.items():
value, changes = re.subn(key, map_value, value)
if changes > 0:
break

Expand Down

0 comments on commit f1ec2d2

Please sign in to comment.