I don't see PMI_ERR_DUPINSTNAME being available on the Python side
(like it is on the Perl side) so use the hard coded number for now
and switch to PMI_ERR_DUPINSTNAME once there.
This is a must-have in order to deal with metrics sharing indom.
---
src/pmrep/pmrep.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/pmrep/pmrep.py b/src/pmrep/pmrep.py
index ca696ff..588386b 100644
--- a/src/pmrep/pmrep.py
+++ b/src/pmrep/pmrep.py
@@ -1178,8 +1178,12 @@ class PMReporter(object):
self.descs[i].contents.sem,
self.descs[i].contents.units)
ins = 0 if self.insts[i][0][0] == PM_IN_NULL else
len(self.insts[i][0])
- for j in range(ins):
- self.log.pmiAddInstance(self.descs[i].contents.indom,
self.insts[i][1][j], self.insts[i][0][j])
+ try:
+ for j in range(ins):
+ self.log.pmiAddInstance(self.descs[i].contents.indom,
self.insts[i][1][j], self.insts[i][0][j])
+ except pmi.pmiErr as error:
+ if error.args[0] == -20003: # PMI_ERR_DUPINSTNAME
+ continue
# Add current values
data = 0
Thanks,
--
Marko Myllynen
|