public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Brian Dolbec" <brian.dolbec@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/eclean/
Date: Wed, 13 Jul 2011 05:53:30 +0000 (UTC)	[thread overview]
Message-ID: <752c3db97d11ab07b5a0ed9c5cd892cc5e610854.dol-sen@gentoo> (raw)

commit:     752c3db97d11ab07b5a0ed9c5cd892cc5e610854
Author:     dol-sen <brian.dolbec <AT> gmail <DOT> com>
AuthorDate: Wed Jul 13 05:34:01 2011 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Wed Jul 13 05:34:01 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=752c3db9

fix a possibility of a None type error in exclDictMatchCP

---
 pym/gentoolkit/eclean/exclude.py |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/pym/gentoolkit/eclean/exclude.py b/pym/gentoolkit/eclean/exclude.py
index 5f48cab..961bb14 100644
--- a/pym/gentoolkit/eclean/exclude.py
+++ b/pym/gentoolkit/eclean/exclude.py
@@ -199,13 +199,20 @@ def exclDictExpand(exclude):
 
 def exclDictMatchCP(exclude,pkg):
 	"""Checks whether a CP matches the exclusion rules."""
+	if pkg is None:
+		return False
 	if 'anti-packages' in exclude and pkg in exclude['anti-packages']:
 		return False
 	if 'packages' in exclude and pkg in exclude['packages']:
 		return True
-	cat = pkg.split('/')[0]
+	try:
+		cat = pkg.split('/')[0]
+	except:
+		dprint( "exclude", "exclDictMatchCP: Invalid package name: " +\
+			"%s, Could not determine category" %pkg)
+		cat = ''
 	if 'categories' in exclude and cat in exclude['categories']:
-		return True
+			return True
 	return False
 
 def exclDictExpandPkgname(exclude):



             reply	other threads:[~2011-07-13  5:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-13  5:53 Brian Dolbec [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-09-04 20:59 [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/eclean/ Paul Varner
2013-08-11 17:21 Brian Dolbec
2013-08-11 17:21 Brian Dolbec
2012-12-23  7:34 Brian Dolbec
2012-10-31 19:16 Paul Varner
2012-10-31 18:47 Mike Frysinger
2012-01-22 17:50 Brian Dolbec
2011-07-12 14:05 Paul Varner
2011-03-08  8:05 Brian Dolbec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=752c3db97d11ab07b5a0ed9c5cd892cc5e610854.dol-sen@gentoo \
    --to=brian.dolbec@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox