diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-09-24 06:45:18 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-09-24 06:45:18 +0000 |
commit | bb09f2284fd2983d2232d3377de8520847aa110b (patch) | |
tree | 04f14489b7086729c41aec5b1eb20f57509ea507 | |
parent | 90cbb047d50a79d9bdb51b77ef944d9fb4097917 (diff) | |
download | portage-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__.py | 4 |
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: |