Skip to content

Commit

Permalink
Merge pull request #873 from Johann-PLW/lava-output
Browse files Browse the repository at this point in the history
Remove Python3.12 warnings & fix path issue with some zip extractions
  • Loading branch information
Johann-PLW authored Oct 15, 2024
2 parents fddb294 + a798e61 commit b878bd4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/html_parts.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"""
# body_main_data is a placeholder, replace content with real data
body_main_data = \
"""
r"""
<h5>All dates and times are in UTC unless stated otherwise.</h5>
<div class="alert alert-warning" role="alert">
All dates and times are in UTC unless noted otherwise!
Expand Down
2 changes: 1 addition & 1 deletion scripts/ilapfuncs.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def handle_bad_data(index, character):
return mis_encoded_utf8_present, "".join(output)

def sanitize_file_path(filename, replacement_char='_'):
'''
r'''
Removes illegal characters (for windows) from the string passed. Does not replace \ or /
'''
return re.sub(r'[*?:"<>|\'\r\n]', replacement_char, filename)
Expand Down
2 changes: 2 additions & 0 deletions scripts/search_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@ def search(self, filepattern, return_on_first_hit=False):
except Exception as ex:
member = member.lstrip("/")
logfunc(f'Could not write file to filesystem, path was {member} ' + str(ex))
if member.startswith("/"):
member = member[1:]
filepath = os.path.join(self.temp_folder, member)
if is_platform_windows():
filepath = filepath.replace('/', '\\')
Expand Down

0 comments on commit b878bd4

Please sign in to comment.