diff --git a/spaceapi/sensors.py b/spaceapi/sensors.py --- a/spaceapi/sensors.py +++ b/spaceapi/sensors.py @@ -1,5 +1,7 @@ import json +from functools import partial + from pkg_resources import resource_filename import jsonschema @@ -18,11 +20,7 @@ ALLOWED_SENSORS_KEYS = json.load( RADIATON_SUBKEYS = ('alpha', 'beta', 'gamma', 'beta_gamma') -IDENTIFICATION_KEYS = ('name', 'location') - - -def get_identification_key(data): - return first(data, IDENTIFICATION_KEYS) +get_identifacation_key = partial(first, keys=('name', 'location')) def set_value(data, key):