From 9f53069e37e319959f3c30266b8de16494a9930c Mon Sep 17 00:00:00 2001 From: Michael Fenn Date: Mon, 7 Apr 2014 18:51:43 -0400 Subject: check for existence of isatty to account for older wsgi Log objects --- src/lib/Bcfg2/Logger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/Bcfg2/Logger.py b/src/lib/Bcfg2/Logger.py index 0f7995e0f..11eaeebd1 100644 --- a/src/lib/Bcfg2/Logger.py +++ b/src/lib/Bcfg2/Logger.py @@ -21,7 +21,7 @@ class TermiosFormatter(logging.Formatter): def __init__(self, fmt=None, datefmt=None): logging.Formatter.__init__(self, fmt, datefmt) - if sys.stdout.isatty(): + if hasattr(sys.stdout, 'isatty') and sys.stdout.isatty(): # now get termios info try: self.width = struct.unpack('hhhh', -- cgit v1.2.3-1-g7c22