mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Use six.text_type instead of str to check instance type
This commit is contained in:
parent
ff50cdb183
commit
7e9ce2dbd5
1 changed files with 2 additions and 2 deletions
|
@ -135,10 +135,10 @@ def normalize_env(env):
|
|||
# want UTF-8, they shouldn't pass in a unicode instance.
|
||||
normalized_env = {}
|
||||
for k, v in env.items():
|
||||
if isinstance(k, unicode):
|
||||
if isinstance(k, six.text_type):
|
||||
k = k.encode('utf-8', 'strict')
|
||||
|
||||
if isinstance(v, unicode):
|
||||
if isinstance(v, six.text_type):
|
||||
v = v.encode('utf-8', 'strict')
|
||||
|
||||
normalized_env[k] = v
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue