From b0c9ab168deeb0c7e11f8a334169ebc8d173b465 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Tue, 27 Mar 2012 12:23:56 +0200 Subject: [PATCH] Never refresh when stdout is not a TTY. This fixes #43. --- bin/rqinfo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/rqinfo b/bin/rqinfo index 496ee028..cc3905b5 100755 --- a/bin/rqinfo +++ b/bin/rqinfo @@ -148,10 +148,10 @@ def parse_args(): def interval(val, func, args): while True: - if val: + if val and sys.stdout.isatty(): os.system('clear') func(args) - if val: + if val and sys.stdout.isatty(): time.sleep(val) else: break