Show More
@@ -59,21 +59,7 b' expandglobs = False' | |||||
59 | umask = os.umask(0) |
|
59 | umask = os.umask(0) | |
60 | os.umask(umask) |
|
60 | os.umask(umask) | |
61 |
|
61 | |||
62 | if not pycompat.ispy3: |
|
62 | posixfile = open | |
63 |
|
||||
64 | def posixfile(name, mode='r', buffering=-1): |
|
|||
65 | fp = open(name, mode=mode, buffering=buffering) |
|
|||
66 | # The position when opening in append mode is implementation defined, so |
|
|||
67 | # make it consistent by always seeking to the end. |
|
|||
68 | if 'a' in mode: |
|
|||
69 | fp.seek(0, os.SEEK_END) |
|
|||
70 | return fp |
|
|||
71 |
|
||||
72 |
|
||||
73 | else: |
|
|||
74 | # The underlying file object seeks as required in Python 3: |
|
|||
75 | # https://github.com/python/cpython/blob/v3.7.3/Modules/_io/fileio.c#L474 |
|
|||
76 | posixfile = open |
|
|||
77 |
|
63 | |||
78 |
|
64 | |||
79 | def split(p): |
|
65 | def split(p): |
General Comments 0
You need to be logged in to leave comments.
Login now