mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
dirstate: fix generator/list error when using python 2.7
util.statfiles returns a generator on python 2.7 with c extensions disabled. This caused util.statfiles(...) [0] to break in tests. Since we're only stat'ing one file, I just changed it to call lstat directly.
This commit is contained in:
parent
853b87cfc0
commit
5317973684
@ -703,7 +703,11 @@ class dirstate(object):
|
||||
# Report ignored items in the dmap as long as they are not
|
||||
# under a symlink directory.
|
||||
if ignore(nf) and audit_path.check(nf):
|
||||
results[nf] = util.statfiles([join(nf)])[0]
|
||||
try:
|
||||
results[nf] = lstat(join(nf))
|
||||
except OSError:
|
||||
# file doesn't exist
|
||||
results[nf] = None
|
||||
else:
|
||||
# It's either missing or under a symlink directory
|
||||
results[nf] = None
|
||||
|
Loading…
Reference in New Issue
Block a user