Skip to content

Commit b02ebba

Browse files
committed
Properly escape backslashes
1 parent d944718 commit b02ebba

File tree

2 files changed

+31
-1369
lines changed

2 files changed

+31
-1369
lines changed

bw2io/strategies/simapro.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -406,19 +406,19 @@ def normalize_simapro_biosphere_names(db):
406406

407407

408408
iff_exp = re.compile(
409-
"iff\(" # Starting condition, case-insensitive
410-
"\s*" # Whitespace
409+
"iff\\(" # Starting condition, case-insensitive
410+
"\\s*" # Whitespace
411411
"(?P<condition>[^,]+)" # Anything except a comma (not sure what else could go here, so capture everything)
412-
"\s*" # Whitespace
412+
"\\s*" # Whitespace
413413
"," # Comma marks the end of the conditional clause
414-
"\s*" # Whitespace
414+
"\\s*" # Whitespace
415415
"(?P<when_true>[^,]+)" # Value if condition is true
416-
"\s*" # Whitespace
416+
"\\s*" # Whitespace
417417
"," # Comma marks the end of the true value clause
418-
"\s*" # Whitespace
418+
"\\s*" # Whitespace
419419
"(?P<when_false>[^,]+)" # Value if condition is false
420-
"\s*" # Whitespace
421-
"\)", # End parentheses
420+
"\\s*" # Whitespace
421+
"\\)", # End parentheses
422422
re.IGNORECASE,
423423
)
424424

0 commit comments

Comments
 (0)