changeset 31544:e6d4cc29fd60

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.
author Ryan McElroy <rmcelroy@fb.com>
date Tue, 21 Mar 2017 06:50:28 -0700
parents c6cbe5720353
children 52361c4f4dac
files mercurial/posix.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/posix.py	Tue Mar 21 06:50:28 2017 -0700
+++ b/mercurial/posix.py	Tue Mar 21 06:50:28 2017 -0700
@@ -545,7 +545,7 @@
             raise
     # try removing directories that might now be empty
     try:
-        os.removedirs(os.path.dirname(f))
+        removedirs(os.path.dirname(f))
     except OSError:
         pass