Add help message to check_tty AttributeError

This commit is contained in:
Edward Barak
2019-03-28 09:37:07 -04:00
parent efeb57282b
commit 57a36d49f2

View File

@@ -109,7 +109,10 @@ class Infinite(object):
print(SHOW_CURSOR, end='', file=self.file)
def is_tty(self):
try:
return self.file.isatty() if self.check_tty else True
except AttributeError:
raise AttributeError('\'{}\' object has no attribute \'isatty\'. Try setting parameter check_tty=False.'.format(self))
def next(self, n=1):
now = monotonic()