Red Hat Bugzilla – Bug 625019
BugzillaBase.__del__ seems to be unsafe
Last modified: 2012-02-04 17:40:12 EST
Created attachment 439364 [details]
Patch fixing the issue
Description of problem:
After running one of the Fedora PkgDB tests am writing I'm experiencing such a weird message:
Exception TypeError: "'NoneType' object is not callable" in <bound method RHBugzilla3.__del__ of <bugzilla.rhbugzilla.RHBugzilla3 object at 0x37c1810>> ignored
After some investigation I found out that the problem is caused by calling os.remove(self.cookiefile) during BugzillaBase.__del__. The os module seems to be partly torn down as is mentioned in Warning part here http://docs.python.org/reference/datamodel.html#object.__del__.
It helped to keep reference to the method in the object as can be seen in the patch.
I have never met such behaviour before and am not sure if I'm interpreting it well. I'm also not aware of anything unusual in my code that may be causing this. The attached patch fixed the issue for me.
Version-Release number of selected component (if applicable):
Always in this particular usecase. I didn't tried it on another machine though. Not trivial to setup, but if you are interested let me know.
I've pushed a patch to python-bugzilla git that should fix this:
If you can try to reproduce the problem with a git checkout that'd be really helpful. Thanks!
It appears this patch is in f16 and rawhide, so closing.