diff options
author | jquast <contact@jeffquast.com> | 2013-09-07 12:11:38 -0400 |
---|---|---|
committer | jquast <contact@jeffquast.com> | 2013-09-07 15:34:16 -0400 |
commit | 249dedf6e040bbab52b4fba9e46176077084d70d (patch) | |
tree | 01594a557b62e206002b70d7fe456ea9ad99bcdb | |
parent | 04b61d9f3e25efb4480680506f1458a1af131c5d (diff) | |
download | blessings-249dedf6e040bbab52b4fba9e46176077084d70d.tar.gz |
'os' imported but unused
-rw-r--r-- | blessings/__init__.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/blessings/__init__.py b/blessings/__init__.py index 1cfbcec..7df9bec 100644 --- a/blessings/__init__.py +++ b/blessings/__init__.py @@ -9,7 +9,6 @@ except ImportError: """A dummy exception to take the place of Python 3's ``io.UnsupportedOperation`` in Python 2""" import os -from os import isatty, environ from platform import python_version_tuple import struct import sys @@ -80,10 +79,17 @@ class Terminal(object): except IOUnsupportedOperation: stream_descriptor = None +<<<<<<< HEAD self._is_a_tty = (stream_descriptor is not None and isatty(stream_descriptor)) self._does_styling = ((self.is_a_tty or force_styling) and force_styling is not None) +======= + self.is_a_tty = (stream_descriptor is not None and + os.isatty(stream_descriptor)) + self.does_styling = ((self.is_a_tty or force_styling) and + force_styling is not None) +>>>>>>> 'os' imported but unused # The desciptor to direct terminal initialization sequences to. # sys.__stdout__ seems to always have a descriptor of 1, even if output @@ -97,7 +103,7 @@ class Terminal(object): # init sequences to the stream if it has a file descriptor, and # send them to stdout as a fallback, since they have to go # somewhere. - setupterm(kind or environ.get('TERM', 'unknown'), + setupterm(kind or os.environ.get('TERM', 'unknown'), self._init_descriptor) self.stream = stream |