Added IndexError catch for copy module, IndexError is thrown if a destination file doesn't exist

reviewable/pr18780/r1
Jeremy Smitherman 13 years ago
parent b725b972ad
commit 77944949fe

@ -84,7 +84,11 @@ md5sum_src = None
md5sum_src = md5_sum(src) md5sum_src = md5_sum(src)
md5sum_dest = None md5sum_dest = None
md5sum_dest = md5_sum(dest) try:
md5sum_dest = md5_sum(dest)
except IndexError:
# File doesn't exist yet, so clear to continue
pass
if md5sum_src != md5sum_dest: if md5sum_src != md5sum_dest:
os.system("cp %s %s" % (src, dest)) os.system("cp %s %s" % (src, dest))

Loading…
Cancel
Save