diff options
author | Zac Medico <zmedico@gentoo.org> | 2012-12-24 13:06:43 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2012-12-24 13:06:43 -0800 |
commit | 8d27739e6b395ad36f349752a02f55b58e731204 (patch) | |
tree | d19f6f7451b98809651d6ad4a02383e9bf130528 | |
parent | a5fdf591cffaa787ac8c579f853e5ea8c20b4543 (diff) | |
download | portage-8d27739e6b395ad36f349752a02f55b58e731204.tar.gz portage-8d27739e6b395ad36f349752a02f55b58e731204.tar.bz2 portage-8d27739e6b395ad36f349752a02f55b58e731204.zip |
binarytree: tweak deprecated constructor param
-rw-r--r-- | pym/portage/dbapi/bintree.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py index 2203aafda..890e8e10b 100644 --- a/pym/portage/dbapi/bintree.py +++ b/pym/portage/dbapi/bintree.py @@ -258,7 +258,7 @@ 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, + def __init__(self, _unused=DeprecationWarning, pkgdir=None, virtual=DeprecationWarning, settings=None): if pkgdir is None: @@ -267,11 +267,11 @@ class binarytree(object): if settings is None: raise TypeError("settings parameter is required") - if _unused is not None and _unused != settings['ROOT']: - warnings.warn("The root parameter of the " + if _unused is not DeprecationWarning: + warnings.warn("The first parameter of the " "portage.dbapi.bintree.binarytree" - " constructor is now unused. Use " - "settings['ROOT'] instead.", + " constructor is now unused. Instead " + "settings['ROOT'] is used.", DeprecationWarning, stacklevel=2) if virtual is not DeprecationWarning: |