Bug 625019 - BugzillaBase.__del__ seems to be unsafe
BugzillaBase.__del__ seems to be unsafe
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: python-bugzilla (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Will Woods
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-18 07:17 EDT by Martin Bacovsky
Modified: 2012-02-04 17:40 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-04 17:40:12 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch fixing the issue (914 bytes, application/octet-stream)
2010-08-18 07:17 EDT, Martin Bacovsky
no flags Details

  None (edit)
Description Martin Bacovsky 2010-08-18 07:17:29 EDT
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):
python-bugzilla-0.6.1-1.fc13.noarch

How reproducible:
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.
Comment 1 Will Woods 2011-06-01 17:29:01 EDT
I've pushed a patch to python-bugzilla git that should fix this:

http://git.fedorahosted.org/git/?p=python-bugzilla.git;a=commitdiff;h=f2d81c5

If you can try to reproduce the problem with a git checkout that'd be really helpful. Thanks!
Comment 2 Cole Robinson 2012-02-04 17:40:12 EST
It appears this patch is in f16 and rawhide, so closing.

Note You need to log in before you can comment on or make changes to this bug.