diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-10-28 21:17:11 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-10-28 21:17:11 -0700 |
commit | 3cfb2bc711d820fcef376aee170de560d8195819 (patch) | |
tree | 087687d6b3c43cfe4d81a785c308b20f22b9005b /pym/portage/dbapi/bintree.py | |
parent | 81e1f72cc7c749b4c46bac995e144678dea2d3fe (diff) | |
download | portage-3cfb2bc711d820fcef376aee170de560d8195819.tar.gz portage-3cfb2bc711d820fcef376aee170de560d8195819.tar.bz2 portage-3cfb2bc711d820fcef376aee170de560d8195819.zip |
Deprecate unused 'virtual' constructor parameters
Diffstat (limited to 'pym/portage/dbapi/bintree.py')
-rw-r--r-- | pym/portage/dbapi/bintree.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py index 0fb8be9c5..4c2492990 100644 --- a/pym/portage/dbapi/bintree.py +++ b/pym/portage/dbapi/bintree.py @@ -243,7 +243,8 @@ def _pkgindex_cpv_map_latest_build(pkgindex): class binarytree(object): "this tree scans for a list of all packages available in PKGDIR" - def __init__(self, _unused=None, pkgdir=None, virtual=None, settings=None): + def __init__(self, _unused=None, pkgdir=None, + virtual=DeprecationWarning, settings=None): if pkgdir is None: raise TypeError("pkgdir parameter is required") @@ -258,6 +259,12 @@ class binarytree(object): "settings['ROOT'] instead.", DeprecationWarning, stacklevel=2) + if virtual is not DeprecationWarning: + warnings.warn("The 'virtual' parameter of the " + "portage.dbapi.bintree.binarytree" + " constructor is unused", + DeprecationWarning, stacklevel=2) + if True: self.pkgdir = normalize_path(pkgdir) self.dbapi = bindbapi(self, settings=settings) |