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.
in
hasattr
1 parent 1fa2c3c commit f65207aCopy full SHA for f65207a
xbout/wall.py
@@ -83,7 +83,7 @@ def read_geqdsk(filehandle):
83
data = geqdsk.read(filehandle)
84
# rlim and zlim should be 1D arrays of wall coordinates
85
86
- if not (hasattr(data, "rlim") and hasattr(data, "zlim")):
+ if not (("rlim" in data) and ("zlim" in data)):
87
raise ValueError(f"Wall coordinates not found in GEQDSK file")
88
89
return AxisymmetricWall(data["rlim"], data["zlim"])
0 commit comments