Skip to content

Commit

Permalink
Fix uneeded keys call
Browse files Browse the repository at this point in the history
  • Loading branch information
mraspaud committed May 14, 2020
1 parent b6b7800 commit f3ad83f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions satpy/readers/satpy_cf_nc.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2019 Satpy developers
# Copyright (c) 2020 Satpy developers
#
# This file is part of satpy.
#
Expand Down Expand Up @@ -95,7 +95,7 @@ def get_dataset(self, ds_id, ds_info):
chunks={'y': CHUNK_SIZE, 'x': CHUNK_SIZE})
file_key = ds_info.get('file_key', ds_id.name)
data = nc[file_key]
if file_key in nc.coords.keys():
if file_key in nc.coords:
data = data.drop_vars(list(nc.coords.keys()))
try:
data.attrs['wavelength'] = tuple(data.attrs['wavelength'])
Expand Down

0 comments on commit f3ad83f

Please sign in to comment.