From ed600413b21805161f300b6f6325851c6f9c6a12 Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Tue, 31 Jul 2012 09:38:30 -0500 Subject: Plugin.py: Remove custom sort This causes problems for PY3K and also appears to be unnecessary as we already handle priorities in the Specificity class. Signed-off-by: Sol Jerome --- src/lib/Bcfg2/Server/Plugin.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/lib/Bcfg2/Server/Plugin.py b/src/lib/Bcfg2/Server/Plugin.py index 2a68ea3b7..18d4bb05d 100644 --- a/src/lib/Bcfg2/Server/Plugin.py +++ b/src/lib/Bcfg2/Server/Plugin.py @@ -1068,7 +1068,7 @@ class EntrySet(Debuggable): gspec = [ent for ent in matching if ent.specific.group] if gspec: - gspec.sort(self.group_sortfunc) + gspec.sort() return gspec[-1] aspec = [ent for ent in matching if ent.specific.all] @@ -1174,10 +1174,6 @@ class EntrySet(Debuggable): elif event.filename in [':info', 'info']: self.metadata = default_file_metadata.copy() - def group_sortfunc(self, x, y): - """sort groups by their priority""" - return cmp(x.specific.prio, y.specific.prio) - def bind_info_to_entry(self, entry, metadata): bind_info(entry, metadata, infoxml=self.infoxml, default=self.metadata) -- cgit v1.2.3-1-g7c22