Fix too long logs dir for analyze logs

Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
This commit is contained in:
Andrey Berezin 2022-11-18 14:24:40 +03:00 committed by abereziny
parent 6047ad2fb5
commit 4e6bbaca64
2 changed files with 3 additions and 14 deletions

View file

@ -164,15 +164,3 @@ 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("_")