Skip to content

Commit

Permalink
Update colout.py
Browse files Browse the repository at this point in the history
Python 2 will retire in thirteen days (see https://pythonclock.org/), there is no reason to keep obsolete checks in the code any longer.
  • Loading branch information
linkmauve authored Dec 18, 2019
1 parent b62b575 commit dab5555
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions colout/colout.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
# Global variable(s)
###############################################################################

PY2 = sys.version_info.major == 2

context = {}
debug = False

Expand Down Expand Up @@ -757,9 +755,6 @@ def write(colored, stream = sys.stdout):
"""
Write "colored" on sys.stdout, then flush.
"""
if PY2: # If Python 2.x: force unicode
if isinstance(colored, unicode):
colored = colored.encode('utf-8')
try:
stream.write(colored)
stream.flush()
Expand Down

0 comments on commit dab5555

Please sign in to comment.