Never refresh when stdout is not a TTY.

This fixes #43.
This commit is contained in:
Vincent Driessen 2012-03-27 12:23:56 +02:00
parent 59aebf8676
commit b0c9ab168d
1 changed files with 2 additions and 2 deletions

View File

@ -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