Skip to content

Commit f745cdb

Browse files
committed
HybridModule is a Module subclass
1 parent 96c7568 commit f745cdb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/_gomodulehacks.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# coding: utf-8
22

33
from __go__.grumpy import SysModules
4+
import errno
5+
6+
# For some reason, importing and extending grumpy.Module does not work.
7+
Module = type(errno)
48

59

610
def hybrid_module(modulename, modulefile, moduledict, all_attrs, globals_):
@@ -12,7 +16,7 @@ def hybrid_module(modulename, modulefile, moduledict, all_attrs, globals_):
1216
1317
And does include the resulting module on sys.modules at the end.
1418
"""
15-
class HybridModule(object):
19+
class HybridModule(Module):
1620
def __init__(self):
1721
moduledict['__name__'] = modulename
1822
moduledict['__file__'] = modulefile

0 commit comments

Comments
 (0)