Correct the two last unicode issues

This commit is contained in:
Dave Halter
2017-12-29 12:59:06 +01:00
parent 2ba46759fc
commit ed57f6172f
2 changed files with 2 additions and 2 deletions

View File

@@ -303,7 +303,7 @@ class SequenceLiteralContext(ArrayMixin, AbstractIterable):
for key, value in self._items():
for k in self._defining_context.eval_node(key):
if isinstance(k, compiled.CompiledObject) \
and k.execute_operation(compiled_obj_index, '==').get_safe_value():
and k.execute_operation(compiled_obj_index, u'==').get_safe_value():
return self._defining_context.eval_node(value)
raise KeyError('No key found in dictionary %s.' % self)

View File

@@ -477,7 +477,7 @@ def tree_name_to_contexts(evaluator, context, tree_name):
types = _remove_statements(evaluator, context, node, tree_name)
elif typ == 'with_stmt':
context_managers = context.eval_node(node.get_test_node_from_name(tree_name))
enter_methods = context_managers.py__getattribute__('__enter__')
enter_methods = context_managers.py__getattribute__(u'__enter__')
return enter_methods.execute_evaluated()
elif typ in ('import_from', 'import_name'):
types = imports.infer_import(context, tree_name)