Never refresh when stdout is not a TTY.

This fixes #43.
main
Vincent Driessen 13 years ago
parent 59aebf8676
commit b0c9ab168d

@ -148,10 +148,10 @@ def parse_args():
def interval(val, func, args): def interval(val, func, args):
while True: while True:
if val: if val and sys.stdout.isatty():
os.system('clear') os.system('clear')
func(args) func(args)
if val: if val and sys.stdout.isatty():
time.sleep(val) time.sleep(val)
else: else:
break break

Loading…
Cancel
Save