minor fix in mglib.utils

pull/3/head
Eugen Ciur 2020-08-17 11:24:16 +02:00
parent 5edd196aaa
commit 0158fb8295
3 changed files with 11 additions and 2 deletions

View File

@ -1,6 +1,11 @@
# Changelog # Changelog
## [1.2.7] - 17 August 2020
### Changed
- Do not raise exception when encoutering unsafe extention, log warning message instead.
## [1.2.6] - 11 August 2020 ## [1.2.6] - 11 August 2020

View File

@ -44,7 +44,11 @@ def safe_to_delete(place):
for name in files: for name in files:
base, ext = os.path.splitext(name) base, ext = os.path.splitext(name)
if ext not in SAFE_EXTENSIONS: if ext not in SAFE_EXTENSIONS:
raise Exception("Trying to delete unsefe location") logger.warning(
f"Trying to delete unsefe location: "
f"extention={ext} not found in {SAFE_EXTENSIONS}"
)
return False
return True return True

View File

@ -6,7 +6,7 @@ with open("README.md", "r") as fh:
setup( setup(
name="mglib", name="mglib",
version="1.2.6", version="1.2.7",
author="Eugen Ciur", author="Eugen Ciur",
author_email="eugen@papermerge.com", author_email="eugen@papermerge.com",
url="https://github.com/papermerge/mglib", url="https://github.com/papermerge/mglib",