[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:12 UTC 2011


The following commit has been merged in the debian branch:
commit afa68928a43c8278307e4bd4fbe1a78e40a1c7c8
Author: Sebastian Krzyszkowiak <seba.dos1 at gmail.com>
Date:   Thu Aug 27 21:29:57 2009 +0200

    opimd: support less or equal and greater or equal
    
    Usage is the same like with _lt_ and _gt_ (_le_ and _ge_)

diff --git a/framework/subsystems/opimd/pimd_generic.py b/framework/subsystems/opimd/pimd_generic.py
index e8c82ca..e1b125d 100644
--- a/framework/subsystems/opimd/pimd_generic.py
+++ b/framework/subsystems/opimd/pimd_generic.py
@@ -319,7 +319,7 @@ class GenericEntry():
 
         for field_name in query_obj.keys():
 
-            if field_name.startswith('_') and (field_name.startswith('_int_') or field_name.startswith('_float_') or field_name.startswith('_gt_') or field_name.startswith('_lt_')):
+            if field_name.startswith('_') and (field_name.startswith('_int_') or field_name.startswith('_float_') or field_name.startswith('_gt_') or field_name.startswith('_lt_') or field_name.startswith('_ge_') or field_name.startswith('_le_')):
                 if field_name.startswith('_int_'):
                     mytype = int
                     fieldname = field_name[8:]
@@ -367,6 +367,25 @@ class GenericEntry():
                             else:
                                 if not atleast:
                                     overall_match *= 0.0
+                        elif operator == 'ge':
+                            if comp_value >= field_value:
+                                if not atleast:
+                                    overall_match *= 1.0
+                                else:
+                                    overall_match += 1.0
+                            else:
+                                if not atleast:
+                                    overall_match *= 0.0
+                        elif operator == 'le':
+                            if comp_value <= field_value:
+                                if not atleast:
+                                    overall_match *= 1.0
+                                else:
+                                    overall_match += 1.0
+                            else:
+                                if not atleast:
+                                    overall_match *= 0.0
+
 
                 except KeyError:
                     if not atleast:

-- 
FSO frameworkd Debian packaging



More information about the pkg-fso-commits mailing list