Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

info() reports "Disabled MD5 check for FILE" even if --check-no-md5 u…

…sed. If statement is still true if file fails md5 check.
  • Loading branch information...
commit b99231853fac17edd02a5b0e956235692a75a782 1 parent 9c57a3b
@interra authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 S3/FileLists.py
View
7 S3/FileLists.py
@@ -304,9 +304,10 @@ def __direction_str(is_remote):
## Check MD5
compare_md5 = 'md5' in cfg.sync_checks
# Multipart-uploaded files don't have a valid MD5 sum - it ends with "...-NN"
- if compare_md5 and (src_remote == True and src_list[file]['md5'].find("-") >= 0) or (dst_remote == True and dst_list[file]['md5'].find("-") >= 0):
- compare_md5 = False
- info(u"Disabled MD5 check for %s" % file)
+ if compare_md5:
+ if (src_remote == True and src_list[file]['md5'].find("-") >= 0) or (dst_remote == True and dst_list[file]['md5'].find("-") >= 0):
+ compare_md5 = False
+ info(u"Disabled MD5 check for %s" % file)
if attribs_match and compare_md5:
try:
if src_remote == False and dst_remote == True:

1 comment on commit b992318

@mludvig

The original condition was indeed wrong. Should have been:
if compare_md5 and ((src_remote ==...) or (dst_remote == ...)):
note the "or" condition enclosed in extra (). Merging your patch,
as it surely fixes the mistake too.

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