Skip to content

Commit c53c400

Browse files
authored
Update concat.py (#8538)
1 parent 0bf38c2 commit c53c400

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

xarray/core/concat.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -536,9 +536,10 @@ def _dataset_concat(
536536
result_encoding = datasets[0].encoding
537537

538538
# check that global attributes are fixed across all datasets if necessary
539-
for ds in datasets[1:]:
540-
if compat == "identical" and not utils.dict_equiv(ds.attrs, result_attrs):
541-
raise ValueError("Dataset global attributes not equal.")
539+
if compat == "identical":
540+
for ds in datasets[1:]:
541+
if not utils.dict_equiv(ds.attrs, result_attrs):
542+
raise ValueError("Dataset global attributes not equal.")
542543

543544
# we've already verified everything is consistent; now, calculate
544545
# shared dimension sizes so we can expand the necessary variables

0 commit comments

Comments
 (0)