Skip to content

Commit

Permalink
Never refresh when stdout is not a TTY.
Browse files Browse the repository at this point in the history
This fixes rq#43.
  • Loading branch information
nvie committed Mar 27, 2012
1 parent 59aebf8 commit b0c9ab1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/rqinfo
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b0c9ab1

Please sign in to comment.