We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a086da commit 133a332Copy full SHA for 133a332
packages/proto-plus/proto/_package_info.py
@@ -33,10 +33,11 @@ def compile(name, attrs):
33
# Pull a reference to the module where this class is being
34
# declared.
35
module = sys.modules.get(attrs.get("__module__"))
36
+ module_name = module.__name__ if hasattr(module, __name__) else ""
37
proto_module = getattr(module, "__protobuf__", object())
38
39
# A package should be present; get the marshal from there.
- package = getattr(proto_module, "package", "")
40
+ package = getattr(proto_module, "package", module_name)
41
marshal = Marshal(name=getattr(proto_module, "marshal", package))
42
43
# Done; return the data.
0 commit comments