Skip to content
Snippets Groups Projects
Commit 021e68d3 authored by Adrian Buehlmann's avatar Adrian Buehlmann
Browse files

windows: use os.SEEK_END

parent 6fabde6e
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment