Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit35fd3a0

Browse files
committed
fixes for python 2
1 parenta4b37ca commit35fd3a0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎testgres/utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,13 @@ def file_tail(f, num_lines):
217217
bufsize=8192
218218
buffers=1
219219

220-
end_pos=f.seek(0,os.SEEK_END)
220+
f.seek(0,os.SEEK_END)
221+
end_pos=f.tell()
221222

222223
whileTrue:
223224
offset=max(0,end_pos-bufsize*buffers)
224-
pos=f.seek(offset,os.SEEK_SET)
225+
f.seek(offset,os.SEEK_SET)
226+
pos=f.tell()
225227

226228
lines=f.readlines()
227229
cur_lines=len(lines)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp