mirror of https://github.com/papermerge/mglib
minor fix in mglib.utils
parent
5edd196aaa
commit
0158fb8295
|
@ -1,6 +1,11 @@
|
|||
|
||||
# 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
|
||||
|
||||
|
|
|
@ -44,7 +44,11 @@ def safe_to_delete(place):
|
|||
for name in files:
|
||||
base, ext = os.path.splitext(name)
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue