From a1a610d43d4762d084feaddcc6378ce2795bcb93 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Sat, 26 Mar 2016 03:10:26 -0400 Subject: [PATCH] config: override default env entries Signed-off-by: Philippe Proulx --- barectf/config.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/barectf/config.py b/barectf/config.py index f14579f..7c3a404 100644 --- a/barectf/config.py +++ b/barectf/config.py @@ -66,15 +66,18 @@ class Config: raise ConfigError('barectf metadata error', e) def _augment_metadata_env(self, meta): - env = meta.env - - env['domain'] = 'bare' - env['tracer_name'] = 'barectf' version_tuple = barectf.get_version_tuple() - env['tracer_major'] = version_tuple[0] - env['tracer_minor'] = version_tuple[1] - env['tracer_patch'] = version_tuple[2] - env['barectf_gen_date'] = str(datetime.datetime.now().isoformat()) + base_env = { + 'domain': 'bare', + 'tracer_name': 'barectf' , + 'tracer_major': version_tuple[0], + 'tracer_minor': version_tuple[1], + 'tracer_patch': version_tuple[2], + 'barectf_gen_date': str(datetime.datetime.now().isoformat()), + } + + base_env.update(meta.env) + meta.env = base_env @property def version(self): -- 2.34.1