From 3a63d7c44f5403a091313925689cdf22419ca9e7 Mon Sep 17 00:00:00 2001 From: khamidou Date: Fri, 6 Feb 2009 13:40:02 +0100 Subject: [PATCH] fixed the fix ;) --- fh-fetch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fh-fetch b/fh-fetch index 7dbe46c..0a2b053 100755 --- a/fh-fetch +++ b/fh-fetch @@ -74,16 +74,16 @@ def parse_date(string): def print_field(s): - sys.stdout.write(s.encode("utf8").replace('\n', '\t').strip()) - sys.stdout.write(sep) + try: + sys.stdout.write(s.encode("utf8").replace('\n', '\t').strip()) + sys.stdout.write(sep) + except IOError: + sys.exit(1) def main(): global to_date, from_date, pattern - # handle gracefully SIGPIPE - signal(signal.SIGPIPE, os.exit) - p = optparse.OptionParser() p.add_option("-t", "--feed-title", action="store", dest="feed_title", help="Show feed title", default=1) p.add_option("-s", "--feed-summary", action="store", dest="feed_summary", help="Show feed summary", default=1) -- 2.43.0