posix: use open() instead of file()
authorAugie Fackler <augie@google.com>
Sun, 19 Mar 2017 01:05:48 -0400
changeset 31505 d96d010be4fa
parent 31504 73aa13bc8dac
child 31506 53575feed7c0
posix: use open() instead of file()
mercurial/posix.py
--- a/mercurial/posix.py	Sun Mar 19 01:05:28 2017 -0400
+++ b/mercurial/posix.py	Sun Mar 19 01:05:48 2017 -0400
@@ -181,7 +181,7 @@
                     except OSError as e:
                         if e.errno != errno.ENOENT:
                             raise
-                        file(checknoexec, 'w').close() # might fail
+                        open(checknoexec, 'w').close() # might fail
                         m = os.stat(checknoexec).st_mode
                     if m & EXECFLAGS == 0:
                         # check-exec is exec and check-no-exec is not exec