Skip to content

Commit

Permalink
#10 Fix a python version check statement
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Mar 7, 2017
1 parent f6e1eb0 commit 21735ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/cortexutils/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ def getData(self):

def setEncoding(self):
if sys.stdout.encoding != 'UTF-8':
if sys.version_info.major == 3:
if sys.version_info[0] == 3:
sys.stdout = codecs.getwriter(
'utf-8')(sys.stdout.buffer, 'strict')
else:
sys.stdout = codecs.getwriter('utf-8')(sys.stdout, 'strict')
if sys.stderr.encoding != 'UTF-8':
if sys.version_info.major == 3:
if sys.version_info[0] == 3:
sys.stderr = codecs.getwriter(
'utf-8')(sys.stderr.buffer, 'strict')
else:
Expand Down

0 comments on commit 21735ef

Please sign in to comment.