Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
MMCV
Commits
5e7f7853
Unverified
Commit
5e7f7853
authored
Aug 21, 2020
by
John Zhu
Committed by
GitHub
Aug 21, 2020
Browse files
fix regex bugs in Widows paths (#513)
parent
95a9728c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
mmcv/utils/config.py
mmcv/utils/config.py
+1
-0
No files found.
mmcv/utils/config.py
View file @
5e7f7853
...
@@ -111,6 +111,7 @@ class Config:
...
@@ -111,6 +111,7 @@ class Config:
config_file
=
f
.
read
()
config_file
=
f
.
read
()
for
key
,
value
in
support_templates
.
items
():
for
key
,
value
in
support_templates
.
items
():
regexp
=
r
'\{\{\s*'
+
str
(
key
)
+
r
'\s*\}\}'
regexp
=
r
'\{\{\s*'
+
str
(
key
)
+
r
'\s*\}\}'
value
=
value
.
replace
(
'
\\
'
,
'/'
)
config_file
=
re
.
sub
(
regexp
,
value
,
config_file
)
config_file
=
re
.
sub
(
regexp
,
value
,
config_file
)
with
open
(
temp_config_name
,
'w'
)
as
tmp_config_file
:
with
open
(
temp_config_name
,
'w'
)
as
tmp_config_file
:
tmp_config_file
.
write
(
config_file
)
tmp_config_file
.
write
(
config_file
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment