Make the deprecation warning for the first pordbapi constructor
authorZac Medico <zmedico@gentoo.org>
Tue, 7 Sep 2010 19:40:02 +0000 (12:40 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 7 Sep 2010 19:40:02 +0000 (12:40 -0700)
parameter quiet for now, to give people a wider migration window.

pym/portage/dbapi/porttree.py

index 1169024b874956fd0b93f9c13e4f098f5e7760a0..b9f3e8cc8b56b5252e16cef7766eea2025d83866 100644 (file)
@@ -84,7 +84,7 @@ class portdbapi(dbapi):
 
                porttree_root = self.settings['PORTDIR']
 
-               if _unused_param is not None:
+               if _unused_param is not None and _unused_param != porttree_root:
                        warnings.warn("The first parameter of the " + \
                                "portage.dbapi.porttree.portdbapi" + \
                                " constructor is now unused. " + \