Skip to content

Commit

Permalink
Catch further string SyntaxWarnings along the lines of #1526
Browse files Browse the repository at this point in the history
  • Loading branch information
willend committed Dec 4, 2023
1 parent 11e40c6 commit e3550e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/Python/mcrun/mccode.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def _parse_info(self):
"""

def escape(line):
''' Escape \ and " '''
# ''' Escape \ and " '''
return line.replace('\\', '\\\\').replace('"', r'\"')

def quote(match):
Expand Down
2 changes: 1 addition & 1 deletion tools/Python/mcrun/mcrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ def main():
# load params from file
text = open(options.param).read()
import re
params = re.findall('[\w0-9]+=[^=\s]+', text)
params = re.findall(r'[\w0-9]+=[^=\s]+', text)
options.params = map(clean_quotes, params)
else:
# Clean out quotes (perl mcgui requires this step)
Expand Down

0 comments on commit e3550e0

Please sign in to comment.