From bb09f2284fd2983d2232d3377de8520847aa110b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 24 Sep 2009 06:45:18 +0000 Subject: [PATCH] Warn if cpv_getkey() is given invalid input that triggers legacy code. svn path=/main/trunk/; revision=14401 --- pym/portage/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) 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: -- 2.26.2