summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-09-24 06:45:18 +0000
committerZac Medico <zmedico@gentoo.org>2009-09-24 06:45:18 +0000
commitbb09f2284fd2983d2232d3377de8520847aa110b (patch)
tree04f14489b7086729c41aec5b1eb20f57509ea507
parent90cbb047d50a79d9bdb51b77ef944d9fb4097917 (diff)
downloadportage-bb09f2284fd2983d2232d3377de8520847aa110b.tar.gz
portage-bb09f2284fd2983d2232d3377de8520847aa110b.tar.bz2
portage-bb09f2284fd2983d2232d3377de8520847aa110b.zip
Warn if cpv_getkey() is given invalid input that triggers legacy code.
svn path=/main/trunk/; revision=14401
-rw-r--r--pym/portage/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 7909a403e..407ff3ee7 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -8078,6 +8078,10 @@ def cpv_getkey(mycpv):
m = _cpv_key_re.match(mycpv)
if m is not None:
return m.group(2)
+
+ warnings.warn("portage.cpv_getkey() called with invalid cpv: '%s'",
+ DeprecationWarning)
+
myslash = mycpv.split("/", 1)
mysplit=pkgsplit(myslash[-1])
if mysplit is None: