commit: 5e68bb3140abaf79ecfef0e37459939d795560fc
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Wed May 14 21:28:10 2014 +0000
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Wed May 14 23:48:18 2014 +0000
URL:
http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=5e68bb31
layman/makeconf.py: Implements cmp_to_key on prio_sort
To ensure py2/py3 compat, the cmp_to_key function has been used to
the convert the variable prio_sort to a key instead of a comparison
like py3 returns prio_sort to be.
---
layman/makeconf.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/layman/makeconf.py b/layman/makeconf.py
index b592fc0..d8f0015 100644
--- a/layman/makeconf.py
+++ b/layman/makeconf.py
@@ -20,6 +20,7 @@ import codecs
import re
from layman.utils import path
+from layman.compatibility import cmp_to_key
#===============================================================================
#
@@ -246,7 +247,7 @@ class MakeConf:
return 1
return 0
- self.overlays.sort(prio_sort)
+ self.overlays.sort(key=cmp_to_key(prio_sort))
paths = []
for i in self.overlays: