Skip to content

Commit

Permalink
skip files on stat() failure (issue seedifferently#14)
Browse files Browse the repository at this point in the history
This will continuing processing after a stat() failure, e.g., due to a broken
symlink.
  • Loading branch information
ezacks-barracuda committed Mar 3, 2015
1 parent 8f46347 commit 55edef2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion bin/boto-rsync
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,14 @@ def main():

fullpath = os.path.join(root, file)
key_name = cloud_path + get_key_name(fullpath, path)
file_size = os.path.getsize(fullpath)
try:
file_size = os.path.getsize(fullpath)
except Exception as e:
sys.stdout.write(
'Skipping %s due to error: %s\n' %
(fullpath[len(path):].lstrip(os.sep), str(e))
)
continue

# determine if the file should be excluded according to command line arguments.
excludeFile = False
Expand Down

0 comments on commit 55edef2

Please sign in to comment.