changeset 25462:021e68d37c5b

windows: use os.SEEK_END
author Adrian Buehlmann <adrian@cadifra.com>
date Sat, 06 Jun 2015 14:03:55 +0200
parents 6fabde6ef445
children 03af5c2ddf75
files mercurial/windows.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/windows.py	Fri Jun 05 15:44:43 2015 -0500
+++ b/mercurial/windows.py	Sat Jun 06 14:03:55 2015 +0200
@@ -26,7 +26,6 @@
 unlink = win32.unlink
 
 umask = 0022
-_SEEK_END = 2 # os.SEEK_END was introduced in Python 2.5
 
 def posixfile(name, mode='r', buffering=-1):
     '''Open a file with even more POSIX-like semantics'''
@@ -36,7 +35,7 @@
         # The position when opening in append mode is implementation defined, so
         # make it consistent with other platforms, which position at EOF.
         if 'a' in mode:
-            fp.seek(0, _SEEK_END)
+            fp.seek(0, os.SEEK_END)
 
         return fp
     except WindowsError, err: