python 3 full compatibility

This commit is contained in:
David Halter
2012-07-13 02:10:55 +02:00
parent 24577bc632
commit 354838bb86
2 changed files with 4 additions and 1 deletions

View File

@@ -146,7 +146,10 @@ class Parser(CachedModule):
if not self.path:
try:
f = open(os.path.sep.join(['mixin', self.name]) + '.py')
name = self.name
if name == '__builtin__' and sys.hexversion < 0x03000000:
name = 'builtins'
f = open(os.path.sep.join(['mixin', name]) + '.py')
except IOError:
return {}
else: