cc-4105: refactored metadata into it's own file

This commit is contained in:
Rudi Grinberg 2012-07-19 15:41:09 -04:00
parent 09303a96d3
commit 1c09907fd5
5 changed files with 149 additions and 22 deletions

View file

@ -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()