From a36520ee8636b103eae46acd99eede80b1fbdfda Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Sun, 8 Sep 2002 14:06:41 +0000 Subject: [PATCH] Always copy stdin (seek() sometimes doesn't give an error). git-svn-id: https://rox.svn.sourceforge.net/svnroot/rox/trunk/Archive@1896 66de3db3-b00d-0410-b41b-f4738ad19bea --- formats.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/formats.py b/formats.py index 6622654..5812c49 100644 --- a/formats.py +++ b/formats.py @@ -182,6 +182,8 @@ class FileData: self.path = path start = source.read(300) try: + if source is sys.stdin: + raise "Always copy stdin!" source.seek(0) self.source = source except: -- 2.11.4.GIT