| To: | pcp developers <pcp@xxxxxxxxxxx> |
|---|---|
| Subject: | pmfg: destroy fetchgroup only if it exists |
| From: | Marko Myllynen <myllynen@xxxxxxxxxx> |
| Date: | Wed, 20 Jul 2016 19:48:02 +0300 |
| Delivered-to: | pcp@xxxxxxxxxxx |
| Organization: | Red Hat |
| Reply-to: | Marko Myllynen <myllynen@xxxxxxxxxx> |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 |
From: Frank Ch. Eigler <fche@xxxxxxxxxx>
---
src/python/pcp/pmapi.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/python/pcp/pmapi.py b/src/python/pcp/pmapi.py
index e696330..8d0a786 100644
--- a/src/python/pcp/pmapi.py
+++ b/src/python/pcp/pmapi.py
@@ -2315,8 +2315,7 @@ class fetchgroup(object):
def __del__(self):
"""Destroy the fetchgroup. Drop references to fetchgroup_* items."""
- assert self.pmfg.value != None
- if LIBPCP != None: # might be called late during python3 shutdown;
moot then
+ if LIBPCP != None and self.pmfg.value != None:
sts = LIBPCP.pmDestroyFetchGroup(self.pmfg)
if sts < 0:
raise pmErr(sts)
Thanks,
--
Marko Myllynen
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | pmfg: ignore target with local context, Marko Myllynen |
|---|---|
| Next by Date: | Re: [pcp] PCP libvirt PMDA, Nathan Scott |
| Previous by Thread: | pmfg: ignore target with local context, Marko Myllynen |
| Next by Thread: | pcp updates: marko merge, ds389log fix, qa, Nathan Scott |
| Indexes: | [Date] [Thread] [Top] [All Lists] |