diff options
-rw-r--r-- | ishtar_common/libreoffice.py | 3 | ||||
-rw-r--r-- | ishtar_common/utils.py | 8 |
2 files changed, 2 insertions, 9 deletions
diff --git a/ishtar_common/libreoffice.py b/ishtar_common/libreoffice.py index 573d99361..7ef33efba 100644 --- a/ishtar_common/libreoffice.py +++ b/ishtar_common/libreoffice.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- +from pathvalidate import sanitize_filepath import time import uno @@ -13,7 +14,7 @@ import subprocess # nosec #from com.sun.star.table import CellRangeAddress, CellAddress -from ishtar_common.utils import num2col, sanitize_filepath +from ishtar_common.utils import num2col from django.conf import settings diff --git a/ishtar_common/utils.py b/ishtar_common/utils.py index 52bcd3ddb..8d5f5ec20 100644 --- a/ishtar_common/utils.py +++ b/ishtar_common/utils.py @@ -1828,14 +1828,6 @@ def clean_session_cache(session): cache.set(cache_key_list, [], settings.CACHE_TIMEOUT) -def sanitize_filepath(filepath): - #TODO: python3-pathvalidate - # from pathvalidate import sanitize_filepath - # filepath -> sanitize_filepath(filepath) - keep_characters = (" ", ".", "_", "-", "/") - return "".join(c for c in filepath if c.isalnum() or c in keep_characters).rstrip() - - def get_field_labels_from_path(model, path): """ :param model: base model |