Commit d292a732 authored by Luciano Cauzzi's avatar Luciano Cauzzi

added rename method

parent cdf5d997
......@@ -211,3 +211,12 @@ def encode_file_base64(file_path):
except Exception as e:
logger.error("Error while encoding {} to base 64".format(file_path))
logger.exception(e)
def rename(src, dest) -> bool:
try:
os.rename(src, dest)
except Exception as e:
print("[FILESYSTEM]: Error while renaming file \n{}".format(e))
return False
return True
......@@ -3,7 +3,7 @@ import setuptools
setup(
name='file_manager',
version='0.1.14',
version='0.1.15',
packages=setuptools.find_packages(),
dependency_links=['http://github.comune.brescia.it/innovation-that-excites/logger_library#egg=logger_library'],
install_requires=['setuptools', 'logger_library'],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment