From c24f258eba3a0d6d4c84704c8b925530f559132b Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Thu, 16 Feb 2012 18:03:14 +0000 Subject: [PATCH] now works with piped STDOUT | STDIN constructs. --- lib/damask/asciitable.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/damask/asciitable.py b/lib/damask/asciitable.py index bc489d6a8..b6a30a066 100644 --- a/lib/damask/asciitable.py +++ b/lib/damask/asciitable.py @@ -77,7 +77,10 @@ class ASCIItable(): self.labels = firstline.split() self.headerLen = 1 self.__IO__['validReadSize'] = len(self.labels) - self.__IO__['dataStart'] = self.__IO__['in'].tell() + try: + self.__IO__['dataStart'] = self.__IO__['in'].tell() + except IOError: + pass # ------------------------------------------------------------------ def head_write(self):