This commit is contained in:
Oliver Bristow 2018-08-02 11:57:49 +00:00 committed by GitHub
commit 53d6d56cba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -18,7 +18,6 @@ import string
import hashlib
import functools
import argparse
import six
# set the SIGPIPE handler to kill the program instead of
# ending in a write error when a broken pipe occurs
@ -29,6 +28,8 @@ signal.signal( signal.SIGPIPE, signal.SIG_DFL )
# Global variable(s)
###############################################################################
PY2 = sys.version_info.major == 2
context = {}
debug = False
@ -699,7 +700,7 @@ def write(colored, stream = sys.stdout):
"""
Write "colored" on sys.stdout, then flush.
"""
if six.PY2: # If Python 2.x: force unicode
if PY2: # If Python 2.x: force unicode
if isinstance(colored, unicode):
colored = colored.encode('utf-8')
try:

View file

@ -16,7 +16,7 @@ if sys.argv[-1] == 'publish':
packages = ['colout']
requires = ['argparse', 'pygments', 'babel']
requires = ['argparse; python_version < "2.7"', 'pygments', 'babel']
setup(
name='colout',