Skip to content

Commit

Permalink
i'm not a very smart guy ;)
Browse files Browse the repository at this point in the history
fix #221
  • Loading branch information
wuub committed Jul 26, 2013
1 parent 256cc8e commit f32de04
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions sublimerepl.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,12 +535,6 @@ def _subst_for_translate(window):
project_settings = sublimerepl_build_system_hack.get_project_settings(window)
res.update(project_settings)

# see #200, on older OSX (10.6.8) system wide python won't accept
# dict(unicode -> unicode) as **argument.
# It's best to just str() keys, since they are ascii anyway
if PY2:
return dict((str(key), val) for key, val in res.items())

return res

@staticmethod
Expand All @@ -549,6 +543,12 @@ def _translate_string(window, string, subst=None):
if subst is None:
subst = ReplManager._subst_for_translate(window)

# see #200, on older OSX (10.6.8) system wide python won't accept
# dict(unicode -> unicode) as **argument.
# It's best to just str() keys, since they are ascii anyway
if PY2:
subst = dict((str(key), val) for key, val in subst.items())

return Template(string).safe_substitute(**subst)

@staticmethod
Expand Down

0 comments on commit f32de04

Please sign in to comment.