From: Neal Norwitz Date: Mon, 5 Dec 2005 01:17:03 +0000 (+0000) Subject: Fix SF #1373161, r41552 broke test_file on OS X X-Git-Tag: v2.5a0~1071 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a6fc397a801a4e870e4e2582eb6f902470cdaa01;p=thirdparty%2FPython%2Fcpython.git Fix SF #1373161, r41552 broke test_file on OS X You apparently can seek(0) on sys.stdin on OS X. But you can't go backwards, so seek(-1). --- diff --git a/Lib/test/test_file.py b/Lib/test/test_file.py index 2869ce76c6d8..0803490add62 100644 --- a/Lib/test/test_file.py +++ b/Lib/test/test_file.py @@ -101,7 +101,7 @@ else: f.close() try: - sys.stdin.seek(0) + sys.stdin.seek(-1) except IOError: pass else: