mirror of
https://github.com/davidhalter/jedi.git
synced 2026-11-02 14:57:31 +08:00
A python 2 fix
This commit is contained in:
1 parent
4ec3fb6e12
commit
499408657b
1 file changed
+1
-1
@@ -29,7 +29,7 @@ class _ModuleAttributeName(AbstractNameDefinition):
|
||||
s = self._string_value
|
||||
if self.parent_context.evaluator.environment.version_info.major == 2 \
|
||||
and not isinstance(s, bytes):
|
||||
s = bytes(s, 'utf-8')
|
||||
s = s.encode('utf-8')
|
||||
return ContextSet([
|
||||
create_simple_object(self.parent_context.evaluator, s)
|
||||
])
|
||||
|
||||
Reference in new issue
Block a user