Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 54834 - portage_db_flat.py: undefined reference to key_exists
Summary: portage_db_flat.py: undefined reference to key_exists
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-22 17:12 UTC by Simone Piccinini
Modified: 2004-07-07 18:59 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simone Piccinini 2004-06-22 17:12:44 UTC
not expert in python but i think /usr/lib/portage/pym/portage_db_flat.py line 96:
 if self.key_exists(key):
should be:
 if self.has_key(key):

sorry for my english

Reproducible: Always
Steps to Reproduce:
1.cd /usr/lib/portage/pym
2.python
3.import database from portage_db_flat
4.d=database("/var/db","pkg",None,1000,100)
5.d.del_key("foo")
Actual Results:  
>>> d.del_key("foo")
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/portage/pym/portage_db_flat.py", line 96, in del_key
    if self.key_exists(key):
AttributeError: database instance has no attribute 'key_exists'
>>>


portage version: 2.0.50-r8
Comment 1 Brian Harring (RETIRED) gentoo-dev 2004-06-22 20:39:46 UTC
yeah, it should be self.has_key(key)

I'm kind of amazed nobody has bumped into this- this is guranteed to bork every time.
Comment 2 Brian Harring (RETIRED) gentoo-dev 2004-07-07 18:59:20 UTC
This still is an issue...

possily another .50? 
I don't like the notion of users/devs hitting borkage....