forked from TrueCloudLab/frostfs-testcases
Add log analyze for each test
Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
This commit is contained in:
parent
3e5a204d19
commit
bdbcee4e81
3 changed files with 71 additions and 27 deletions
|
@ -164,3 +164,15 @@ def get_file_content(
|
|||
content = file.read()
|
||||
|
||||
return content
|
||||
|
||||
|
||||
def sanitize_for_file_name(string: str) -> str:
|
||||
"""
|
||||
Returns string with only alpha num string with all other characters replaced by '_'
|
||||
which is valid string to use as file name
|
||||
|
||||
Args:
|
||||
string: string to sanitize
|
||||
"""
|
||||
|
||||
return "".join(character if character.isalnum() else "_" for character in string).strip("_")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue