summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-06-29 21:30:10 +0000
committerZac Medico <zmedico@gentoo.org>2007-06-29 21:30:10 +0000
commit80d3c3e6fd8e1097f980e085a40cb49dd90ba4be (patch)
tree36d62c0c5a1b9e01010d9c2b280536bdcd1c3622
parent31a1f587a8c8c3d7a8cb005248c63a2bebbd800d (diff)
downloadportage-80d3c3e6fd8e1097f980e085a40cb49dd90ba4be.tar.gz
portage-80d3c3e6fd8e1097f980e085a40cb49dd90ba4be.tar.bz2
portage-80d3c3e6fd8e1097f980e085a40cb49dd90ba4be.zip
Test for existence of the getRepositories method since bindbapi doesn't have it atm.
svn path=/main/trunk/; revision=7093
-rw-r--r--pym/portage/dbapi/vartree.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 7bc2c686e..64fafbb57 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -1701,7 +1701,8 @@ class dblink(object):
# do we have a origin repository name for the current package
repopath = os.sep.join(self.settings["O"].split(os.sep)[:-2])
- if mydbapi != None:
+ # bindbapi has no getRepositories() method
+ if mydbapi and hasattr(mydbapi, "getRepositories"):
for reponame in mydbapi.getRepositories():
if mydbapi.getRepositoryPath(reponame) == repopath:
fd = open(os.path.join(self.dbtmpdir, "repository"), "w")