From: Fabian Groffen Date: Tue, 27 Feb 2007 19:35:27 +0000 (-0000) Subject: Avoid "TypeError: unpack non-sequence" backtraces, and return a set of X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=a0fc31a40ddfc0cb1f206b8344d6f0a76d3ba68e;p=portage.git Avoid "TypeError: unpack non-sequence" backtraces, and return a set of None, None when was asked for the location. svn path=/main/branches/prefix/; revision=6093 --- diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 2c820bd4d..e4aa7df18 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -4475,7 +4475,10 @@ def getmaskingreason(mycpv, settings=None, portdb=None, return_location=False): # Apparently this comment applies to muliple masks, so # it remains valid until a blank line is encountered. comment_valid += 1 - return None + if return_location: + return (None, None) + else: + return None def getmaskingstatus(mycpv, settings=None, portdb=None): if settings is None: