mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 23:38:50 +03:00
posix: use local reference to removedirs
We have a local reference to os.removedirs in module scope, but we still used os.removedirs inside functions. This changes util to use the local reference, which will pave the way for combining duplicated code in future patches.
This commit is contained in:
parent
9eb9d0168b
commit
cf50c1b95b
@ -545,7 +545,7 @@ def unlinkpath(f, ignoremissing=False):
|
||||
raise
|
||||
# try removing directories that might now be empty
|
||||
try:
|
||||
os.removedirs(os.path.dirname(f))
|
||||
removedirs(os.path.dirname(f))
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user