Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r15494 - main/trunk/pym/portage/dbapi
Date: Sun, 28 Feb 2010 08:00:23
Message-Id: E1Nle4b-0006L5-Bw@stork.gentoo.org
1 Author: zmedico
2 Date: 2010-02-28 08:00:20 +0000 (Sun, 28 Feb 2010)
3 New Revision: 15494
4
5 Modified:
6 main/trunk/pym/portage/dbapi/porttree.py
7 Log:
8 Remove print() usage.
9
10
11 Modified: main/trunk/pym/portage/dbapi/porttree.py
12 ===================================================================
13 --- main/trunk/pym/portage/dbapi/porttree.py 2010-02-28 06:24:00 UTC (rev 15493)
14 +++ main/trunk/pym/portage/dbapi/porttree.py 2010-02-28 08:00:20 UTC (rev 15494)
15 @@ -2,8 +2,6 @@
16 # Distributed under the terms of the GNU General Public License v2
17 # $Id$
18
19 -from __future__ import print_function
20 -
21 __all__ = [
22 "close_portdbapi_caches", "FetchlistDict", "portagetree", "portdbapi"
23 ]
24 @@ -809,8 +807,8 @@
25 checksums = mf.getDigests()
26 if not checksums:
27 if debug:
28 - print("[empty/missing/bad digest]: "+mypkg)
29 - return None
30 + writemsg("[empty/missing/bad digest]: %s\n" % (mypkg,))
31 + return {}
32 filesdict={}
33 myfiles = self.getFetchMap(mypkg, useflags=useflags)
34 #XXX: maybe this should be improved: take partial downloads
35 @@ -1091,8 +1089,8 @@
36 else:
37 myval = list(self._iter_match(mydep, self.cp_list(mykey)))
38 else:
39 - print("ERROR: xmatch doesn't handle", level, "query!")
40 - raise KeyError
41 + raise AssertionError(
42 + "Invalid level argument: '%s'" % level)
43
44 if self.frozen and (level not in ["match-list", "bestmatch-list"]):
45 self.xcache[level][mydep] = myval