From 2451b740e2b3490fc295a828d64aa5bd368a9aa2 Mon Sep 17 00:00:00 2001 From: Marko Myllynen Date: Thu, 21 Jul 2016 10:03:10 +1000 Subject: [PATCH] python api: destroy fetchgroup only if it really exists --- 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 21912010a..ee073f67f 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) -- 2.11.4.GIT