Skip to content

Commit

Permalink
Merge branch 'bug/lstat-removed-file' into merge
Browse files Browse the repository at this point in the history
  • Loading branch information
mdomsch committed Jan 9, 2014
2 parents cecb9e2 + cd90d1f commit 5d11d99
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion S3/FileLists.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import glob
import copy
import re
import errno

__all__ = ["fetch_local_list", "fetch_remote_list", "compare_filelists", "filter_exclude_include"]

Expand Down Expand Up @@ -226,7 +227,14 @@ def _get_filelist_local(loc_list, local_uri, cache):
relative_file = replace_nonprintables(relative_file)
if relative_file.startswith('./'):
relative_file = relative_file[2:]
sr = os.stat_result(os.lstat(full_name))
try:
sr = os.stat_result(os.lstat(full_name))
except OSError, e:
if e.errno == errno.ENOENT:
# file was removed async to us getting the list
continue
else:
raise
loc_list[relative_file] = {
'full_name_unicode' : unicodise(full_name),
'full_name' : full_name,
Expand Down

0 comments on commit 5d11d99

Please sign in to comment.