[pkg-fso-commits] [SCM] FSO frameworkd Debian packaging branch, debian, updated. upstream/0.9.5.5-717-g0f98819

Sebastian Krzyszkowiak seba.dos1 at gmail.com
Sat Aug 6 08:18:07 UTC 2011


The following commit has been merged in the debian branch:
commit c29058b34f0204edd4dc2373c999d6b81dfa33b7
Author: Sebastian Krzyszkowiak <seba.dos1 at gmail.com>
Date:   Wed Aug 26 15:57:47 2009 +0200

    opimd: now *really* place entries without field which is used for sorting always on end ;)

diff --git a/framework/subsystems/opimd/query_manager.py b/framework/subsystems/opimd/query_manager.py
index efe7ea1..0e2edcb 100644
--- a/framework/subsystems/opimd/query_manager.py
+++ b/framework/subsystems/opimd/query_manager.py
@@ -97,12 +97,18 @@ class QueryMatcher(object):
             sortby = self.query_obj['_sortby']
 
             def compare(x,y):
-                if x and y == None:
+                if x == None and y == None:
                     return 0
-                if x == None:
-                    return 1
-                if y == None:
-                    return -1
+                elif x == None:
+                    if reverse:
+                        return -1
+                    else:
+                        return 1
+                elif y == None:
+                    if reverse:
+                        return 1
+                    else:
+                        return -1
                 return cmp(x,y)
 
             def getkey(element):

-- 
FSO frameworkd Debian packaging



More information about the pkg-fso-commits mailing list