projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed303d8
)
cpv_expand: fix KeyError when settings is None
author
Zac Medico
<zmedico@gentoo.org>
Fri, 8 Jul 2011 06:46:28 +0000
(23:46 -0700)
committer
Zac Medico
<zmedico@gentoo.org>
Fri, 8 Jul 2011 06:46:28 +0000
(23:46 -0700)
pym/portage/dbapi/cpv_expand.py
patch
|
blob
|
history
diff --git
a/pym/portage/dbapi/cpv_expand.py
b/pym/portage/dbapi/cpv_expand.py
index 7077b1febee73851011e539e96662221ab8acb20..947194cca8270fa904b307a351afd5e6329f4987 100644
(file)
--- a/
pym/portage/dbapi/cpv_expand.py
+++ b/
pym/portage/dbapi/cpv_expand.py
@@
-3,6
+3,7
@@
__all__ = ["cpv_expand"]
+import portage
from portage.exception import AmbiguousPackageName
from portage.localization import _
from portage.util import writemsg
@@
-16,7
+17,10
@@
def cpv_expand(mycpv, mydb=None, use_cache=1, settings=None):
myslash=mycpv.split("/")
mysplit = _pkgsplit(myslash[-1])
if settings is None:
- settings = globals()["settings"]
+ try:
+ settings = mydb.settings
+ except AttributeError:
+ settings = portage.settings
if len(myslash)>2:
# this is illegal case.
mysplit=[]