---
src/pmrep/pmrep.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/pmrep/pmrep.py b/src/pmrep/pmrep.py
index 02eba16..483c3e4 100644
--- a/src/pmrep/pmrep.py
+++ b/src/pmrep/pmrep.py
@@ -1128,7 +1128,10 @@ class PMReporter(object):
# Derived metrics need to be passed to pmlogger(1) via env/file
if self.derived:
if self.derived.startswith("/") or self.derived.startswith("."):
- os.environ['PCP_DERIVED_CONFIG'] = self.derived
+ if not os.environ.get('PCP_DERIVED_CONFIG'):
+ os.environ['PCP_DERIVED_CONFIG'] = self.derived
+ else:
+ os.environ['PCP_DERIVED_CONFIG'] =
os.environ['PCP_DERIVED_CONFIG'] + ":" + self.derived
else:
drvf = self.archive + ".derived"
if os.path.exists(drvf):
@@ -1138,7 +1141,10 @@ class PMReporter(object):
for definition in self.derived.split(","):
drv.write(definition.strip() + "\n")
drv.close()
- os.environ['PCP_DERIVED_CONFIG'] = drvf
+ if not os.environ.get('PCP_DERIVED_CONFIG'):
+ os.environ['PCP_DERIVED_CONFIG'] = drvf
+ else:
+ os.environ['PCP_DERIVED_CONFIG'] =
os.environ['PCP_DERIVED_CONFIG'] + ":" + drvf
# Create the archive folio using pmgui
context = pmgui.GuiClient()
Thanks,
--
Marko Myllynen
|