Skip to content

Commit

Permalink
Make sure key is in metadata before trying to use it
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Erickson committed Nov 15, 2011
1 parent f1feb7c commit 2925b3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions S3/FileLists.py
Expand Up @@ -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
Expand Down

0 comments on commit 2925b3b

Please sign in to comment.