)
from dulwich.misc import (
make_sha,
+ SEEK_END,
)
from dulwich.objects import (
ShaFile,
def _buf_len(self):
buf = self._rbuf
start = buf.tell()
- buf.seek(0, os.SEEK_END)
+ buf.seek(0, SEEK_END)
end = buf.tell()
buf.seek(start)
return end - start
HangupException,
GitProtocolError,
)
+from dulwich.misc import (
+ SEEK_END,
+ )
TCP_GIT_PORT = 9418
# - omit the size <= 0 branch
# - seek back to start rather than 0 in case some buffer has been
# consumed.
- # - use os.SEEK_END instead of the magic number.
+ # - use SEEK_END instead of the magic number.
# Copyright (c) 2001-2010 Python Software Foundation; All Rights Reserved
# Licensed under the Python Software Foundation License.
# TODO: see if buffer is more efficient than cStringIO.
# rbufsize is large compared to the typical return value of recv().
buf = self._rbuf
start = buf.tell()
- buf.seek(0, os.SEEK_END)
+ buf.seek(0, SEEK_END)
# buffer may have been partially consumed by recv()
buf_len = buf.tell() - start
if buf_len >= size:
buf = self._rbuf
start = buf.tell()
- buf.seek(0, os.SEEK_END)
+ buf.seek(0, SEEK_END)
buf_len = buf.tell()
buf.seek(start)