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


The following commit has been merged in the debian branch:
commit 6cf3986c62ac48d3587a45ed8a6c32b75ab22198
Author: Sebastian Krzyszkowiak <seba.dos1 at gmail.com>
Date:   Sun Jul 12 00:49:03 2009 +0200

    opimd: cosmetic changes in _limit handling

diff --git a/framework/subsystems/opimd/pimd_calls.py b/framework/subsystems/opimd/pimd_calls.py
index bb40132..d6ce741 100644
--- a/framework/subsystems/opimd/pimd_calls.py
+++ b/framework/subsystems/opimd/pimd_calls.py
@@ -85,12 +85,11 @@ class CallQueryMatcher(object):
         if result_count > 0:
             matches.sort()
 
-            try:
+            limit = result_count
+            if self.query_obj.has_key("_limit"):
                 limit = self.query_obj["_limit"]
                 if limit > result_count:
                     limit = result_count
-            except KeyError:
-                limit = result_count
 
             # Append the call IDs to the result list in the order of the sorted list
             for i in range(limit):
diff --git a/framework/subsystems/opimd/pimd_contacts.py b/framework/subsystems/opimd/pimd_contacts.py
index 9eda8f3..30fbc1c 100644
--- a/framework/subsystems/opimd/pimd_contacts.py
+++ b/framework/subsystems/opimd/pimd_contacts.py
@@ -81,12 +81,11 @@ class ContactQueryMatcher(object):
         if result_count > 0:
             matches.sort()
 
-            try:
+            limit = result_count
+            if self.query_obj.has_key("_limit"):
                 limit = self.query_obj["_limit"]
                 if limit > result_count:
                     limit = result_count
-            except KeyError:
-                limit = result_count
 
             # Append the contact IDs to the result list in the order of the sorted list
             for i in range(limit):
diff --git a/framework/subsystems/opimd/pimd_messages.py b/framework/subsystems/opimd/pimd_messages.py
index 95bcddc..e5cee63 100644
--- a/framework/subsystems/opimd/pimd_messages.py
+++ b/framework/subsystems/opimd/pimd_messages.py
@@ -86,12 +86,11 @@ class MessageQueryMatcher(object):
         if result_count > 0:
             matches.sort()
 
-            try:
+            limit = result_count
+            if self.query_obj.has_key("_limit"):
                 limit = self.query_obj["_limit"]
                 if limit > result_count:
                     limit = result_count
-            except KeyError:
-                limit = result_count
 
             # Append the message IDs to the result list in the order of the sorted list
             for i in range(limit):

-- 
FSO frameworkd Debian packaging



More information about the pkg-fso-commits mailing list