cc-4105: refactored metadata into it's own file
This commit is contained in:
parent
09303a96d3
commit
1c09907fd5
5 changed files with 149 additions and 22 deletions
|
@ -193,7 +193,10 @@ def organized_path(old_path, root_path, normal_md):
|
|||
return filepath
|
||||
|
||||
def file_md5(path,max_length=100):
|
||||
"""Get md5 of file path (if it exists)"""
|
||||
"""
|
||||
Get md5 of file path (if it exists). Use only max_length characters to save time and
|
||||
memory
|
||||
"""
|
||||
if os.path.exists(path):
|
||||
with open(path, 'rb') as f:
|
||||
m = hashlib.md5()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue