summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Logger.py
diff options
context:
space:
mode:
authorMichael Fenn <fennm@deshawresearch.com>2014-04-07 18:51:43 -0400
committerMichael Fenn <fennm@deshawresearch.com>2014-04-07 18:51:43 -0400
commit9f53069e37e319959f3c30266b8de16494a9930c (patch)
tree13143db54bfda27ca70d6d0b96a597bfe6bcb4b7 /src/lib/Bcfg2/Logger.py
parent8b1e5241e9313d119d0620114d9bdd999483b670 (diff)
downloadbcfg2-9f53069e37e319959f3c30266b8de16494a9930c.tar.gz
bcfg2-9f53069e37e319959f3c30266b8de16494a9930c.tar.bz2
bcfg2-9f53069e37e319959f3c30266b8de16494a9930c.zip
check for existence of isatty to account for older wsgi Log objects
Diffstat (limited to 'src/lib/Bcfg2/Logger.py')
-rw-r--r--src/lib/Bcfg2/Logger.py2
1 files changed, 1 insertions, 1 deletions
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',