Commit 13b7549f authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[utils] Add helper method to build environment based key string

parent 751ff4c9
......@@ -178,3 +178,15 @@ def setup_logging(verbosity, format_name, name=None, stream=None):
return logging.getLogger(name)
# ----------------------------------------------------------
def build_env_name(env_data):
"""Build the environment name used for string lookups"""
if not env_data:
return None
return "{name} ({version})".format(**env_data)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment