Skip to content

Commit

Permalink
fix regex bugs in Widows paths (open-mmlab#513)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnzja authored and mattdawkins committed Sep 8, 2020
1 parent e0e5429 commit 78d6531
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mmcv/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def _substitute_predefined_vars(filename, temp_config_name):
config_file = open(filename).read()
for key, value in support_templates.items():
regexp = r'\{\{\s*' + str(key) + r'\s*\}\}'
value = value.replace('\\', '/')
config_file = re.sub(regexp, value, config_file)
with open(temp_config_name, 'w') as tmp_config_file:
tmp_config_file.write(config_file)
Expand Down

0 comments on commit 78d6531

Please sign in to comment.