Skip to content

Commit ccd7954

Browse files
committed
simplified logic
1 parent 3ff1a9a commit ccd7954

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

xarray/backends/pydap_.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,10 @@ def _getitem(self, key):
6262
# this are both True only for pydap>3.5.5
6363
from pydap.lib import resolve_batch_for_all_variables
6464

65-
parent = self.array.parent # could be root ds | group
66-
variables = list(parent.variables())
67-
resolve_batch_for_all_variables(parent, variables, key)
68-
65+
dataset = self.array.dataset
66+
resolve_batch_for_all_variables(self.array, key)
6967
result = np.asarray(
70-
parent.dataset._current_batch_promise.wait_for_result(self.array.id)
68+
dataset._current_batch_promise.wait_for_result(self.array.id)
7169
)
7270
else:
7371
result = robust_getitem(self.array, key, catch=ValueError)

0 commit comments

Comments
 (0)