Merge pull request #531 from jeremysmitherman/devel
Added IndexError catch for copy module, IndexError is thrown if a destin...
This commit is contained in:
commit
c5d10330f0
1 changed files with 5 additions and 1 deletions
|
@ -84,7 +84,11 @@ md5sum_src = None
|
|||
md5sum_src = md5_sum(src)
|
||||
|
||||
md5sum_dest = None
|
||||
try:
|
||||
md5sum_dest = md5_sum(dest)
|
||||
except IndexError:
|
||||
# File doesn't exist yet, so clear to continue
|
||||
pass
|
||||
|
||||
if md5sum_src != md5sum_dest:
|
||||
os.system("cp %s %s" % (src, dest))
|
||||
|
|
Loading…
Reference in a new issue