Skip to content

Commit

Permalink
MNT : hackily make boilerplate PY3 compatable
Browse files Browse the repository at this point in the history
Hide the python2 only code in a conditional
  • Loading branch information
tacaswell committed May 25, 2015
1 parent 2beb5f9 commit f15c871
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions boilerplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,9 @@ def format_value(value):
else:
def_edited = []
for val in defaults:
if isinstance(val, unicode):
val = val.encode('ascii', 'ignore')
if six.PY2:
if isinstance(val, unicode):
val = val.encode('ascii', 'ignore')
def_edited.append(val)
defaults = tuple(def_edited)

Expand Down

0 comments on commit f15c871

Please sign in to comment.