* [gentoo-commits] portage r15497 - in main/trunk/pym/portage: . proxy
@ 2010-02-28 11:31 99% Zac Medico (zmedico)
0 siblings, 0 replies; 1+ results
From: Zac Medico (zmedico) @ 2010-02-28 11:31 UTC (permalink / raw
To: gentoo-commits
Author: zmedico
Date: 2010-02-28 11:31:45 +0000 (Sun, 28 Feb 2010)
New Revision: 15497
Modified:
main/trunk/pym/portage/__init__.py
main/trunk/pym/portage/proxy/objectproxy.py
Log:
Add ObjectProxy __gt__, __ge__, __lt__, and __le__ methods to fix TypeError
with python3 reported by Arfrever:
File "/usr/lib/portage/pym/portage/__init__.py", line 513, in portageexit
if secpass > 1 and os.environ.get("SANDBOX_ON") != "1":
TypeError: unorderable types: _LazyImportFrom() > int()
Modified: main/trunk/pym/portage/__init__.py
===================================================================
--- main/trunk/pym/portage/__init__.py 2010-02-28 10:49:02 UTC (rev 15496)
+++ main/trunk/pym/portage/__init__.py 2010-02-28 11:31:45 UTC (rev 15497)
@@ -510,7 +510,7 @@
auxdbkeylen=len(auxdbkeys)
def portageexit():
- if secpass > 1 and os.environ.get("SANDBOX_ON") != "1":
+ if data.secpass > 1 and os.environ.get("SANDBOX_ON") != "1":
close_portdbapi_caches()
try:
mtimedb
Modified: main/trunk/pym/portage/proxy/objectproxy.py
===================================================================
--- main/trunk/pym/portage/proxy/objectproxy.py 2010-02-28 10:49:02 UTC (rev 15496)
+++ main/trunk/pym/portage/proxy/objectproxy.py 2010-02-28 11:31:45 UTC (rev 15497)
@@ -61,6 +61,18 @@
def __hash__(self):
return hash(object.__getattribute__(self, '_get_target')())
+ def __ge__(self, other):
+ return object.__getattribute__(self, '_get_target')() >= other
+
+ def __gt__(self, other):
+ return object.__getattribute__(self, '_get_target')() > other
+
+ def __le__(self, other):
+ return object.__getattribute__(self, '_get_target')() <= other
+
+ def __lt__(self, other):
+ return object.__getattribute__(self, '_get_target')() < other
+
def __eq__(self, other):
return object.__getattribute__(self, '_get_target')() == other
^ permalink raw reply [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2010-02-28 11:31 99% [gentoo-commits] portage r15497 - in main/trunk/pym/portage: . proxy Zac Medico (zmedico)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox