Skip to content

Commit

Permalink
Review change - code improvement.
Browse files Browse the repository at this point in the history
  • Loading branch information
pp-mo committed Nov 12, 2015
1 parent 529709c commit 747fddb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/iris/fileformats/cf.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,9 +643,9 @@ def identify(cls, variables, ignore=None, target=None, warn=True):
message = 'Missing CF-netCDF label variable %r, referenced by netCDF variable %r'
warnings.warn(message % (name, nc_var_name))
else:
# Restrict to only string type.
if _is_str_dtype(variables[name]):
var = variables[name]
# Register variable, but only allow string type.
var = variables[name]
if _is_str_dtype(var):
result[name] = CFLabelVariable(name, var)

return result
Expand Down

0 comments on commit 747fddb

Please sign in to comment.