Unverified Commit c6461280 authored by Mengqing Cao's avatar Mengqing Cao Committed by GitHub
Browse files

[Platform] improve platforms getattr (#12264)


Signed-off-by: default avatarMengqing Cao <cmq0113@163.com>
parent 9a7c3a00
......@@ -217,8 +217,11 @@ def __getattr__(name: str):
global _init_trace
_init_trace = "".join(traceback.format_stack())
return _current_platform
else:
elif name in globals():
return globals()[name]
else:
raise AttributeError(
f"No attribute named '{name}' exists in {__name__}.")
__all__ = [
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment