From a73628bda9f139dc450cda5ef0fd17cf59933b39 Mon Sep 17 00:00:00 2001 From: bebbo Date: Mon, 11 Dec 2023 21:12:02 +0100 Subject: [PATCH] catch exception in tell for stdin/out --- amitools/vamos/lib/dos/FileHandle.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/amitools/vamos/lib/dos/FileHandle.py b/amitools/vamos/lib/dos/FileHandle.py index 4d54539c..1462e8cc 100644 --- a/amitools/vamos/lib/dos/FileHandle.py +++ b/amitools/vamos/lib/dos/FileHandle.py @@ -135,7 +135,10 @@ def getbuf(self): return self.unch def tell(self): - return self.obj.tell() + try: + return self.obj.tell() + except IOError: + return -1 def seek(self, pos, whence): try: