From 5330a5506edc5685d0aa2a2588b33c0f7cbb5d71 Mon Sep 17 00:00:00 2001 From: Nicolas Dandrimont Date: Sun, 10 Jan 2010 20:38:09 +0100 Subject: [PATCH] [affich_tools] N'explose pas si stdout est un pseudo-objet Ignore-this: 5f4dff531c70ea4d6bc8539fd2371db1 darcs-hash:20100110193809-ffbb2-7c97b6c914adf3fe4f6bfb061ef329d5995fec11.gz --- gestion/affich_tools.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gestion/affich_tools.py b/gestion/affich_tools.py index bd40f753..ba6bb39e 100644 --- a/gestion/affich_tools.py +++ b/gestion/affich_tools.py @@ -29,7 +29,10 @@ if 'TERM' in os.environ and os.environ['TERM'] != 'unknown': else: el = os.popen('tput -Tvt100 cr ; tput -Tvt100 el').read() -stdout_atty = sys.stdout.isatty() +try: + stdout_atty = sys.stdout.isatty() +except IOError: + stdout_atty = False def dialog(backtitle,arg,dialogrc='') : """ Affiche la boite de dialogue défine avec les arguments fournis