Skip to content
Browse files

Make sure key is in metadata before trying to use it

  • Loading branch information...
1 parent f1feb7c commit 2925b3ba92297053f2ac9ec355d1844dba4027ba @firstclown committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 S3/FileLists.py
View
4 S3/FileLists.py
@@ -314,9 +314,9 @@ def __direction_str(is_remote):
elif src_remote == True and dst_remote == True:
src_md5 = src_list[file]['md5']
dst_md5 = dst_list[file]['md5']
- if src_remote == True and cfg.encrypt:
+ if cfg.encrypt and src_md5 in metadata.metadata['md5_trans'] and src_remote == True:
src_md5 = metadata.metadata['md5_trans'][src_md5]
- if dst_remote == True and cfg.encrypt:
+ if cfg.encrypt and dst_md5 in metadata.metadata['md5_trans'] and dst_remote == True:
dst_md5 = metadata.metadata['md5_trans'][dst_md5]
except (IOError,OSError), e:
# MD5 sum verification failed - ignore that file altogether

0 comments on commit 2925b3b

Please sign in to comment.
Something went wrong with that request. Please try again.