From 2853156a2bce535bcaa440c37cf872916f76c03b Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Thu, 3 Jan 2013 08:10:25 +0000 Subject: Refactoring, rename isNil to isNull. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1428206 13f79535-47bb-0310-9956-ffa450edef68 --- sca-cpp/trunk/hosting/server/ratings.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sca-cpp/trunk/hosting/server/ratings.py') diff --git a/sca-cpp/trunk/hosting/server/ratings.py b/sca-cpp/trunk/hosting/server/ratings.py index 5638d8609f..d36dcad45e 100644 --- a/sca-cpp/trunk/hosting/server/ratings.py +++ b/sca-cpp/trunk/hosting/server/ratings.py @@ -31,7 +31,7 @@ def put(id, ratings, user, cache, db, apps): # Get the requested app app = apps.get(id) - if isNil(app): + if isNull(app): debug('ratings.py::put', 'app not found', id) return False @@ -52,7 +52,7 @@ def patch(id, ratings, user, cache, db, apps): # Get the requested app app = apps.get(id) - if isNil(app): + if isNull(app): debug('ratings.py::patch', 'app not found', id) return False @@ -107,9 +107,9 @@ def get(id, user, cache, db, apps): debug('ratings.py::get::id', id) # Return the top ratings - if isNil(id): + if isNull(id): topentries = db.get((("'regex", '("ratings" .* "app.ratings")'), ("'rank", "(regexp_matches(value, '(.*\(rating )([^\)]+)(\).*)'))[2]::float"), ("'limit", 25))) - flatentries = tuple(map(lambda v: car(v), () if isNil(topentries) else topentries)) + flatentries = tuple(map(lambda v: car(v), () if isNull(topentries) else topentries)) def rating(e): return cadr(assoc("'rating", assoc("'ratings", assoc("'content", e)))) sortedentries = tuple(sorted(flatentries, key = rating, reverse = True)) @@ -119,7 +119,7 @@ def get(id, user, cache, db, apps): # Get the requested app app = apps.get(id) - if isNil(app): + if isNull(app): debug('ratings.py::get', 'app not found', id) # Return default ratings @@ -127,7 +127,7 @@ def get(id, user, cache, db, apps): # Get the requested ratings ratings = cache.get(ratingsid(id)) - if isNil(ratings): + if isNull(ratings): debug('ratings.py::get', 'ratings not found', id) # Return default ratings @@ -144,7 +144,7 @@ def delete(id, user, cache, db, apps): # Get the requested app app = apps.get(id) - if isNil(app): + if isNull(app): debug('ratings.py::delete', 'app not found', id) return False -- cgit v1.2.3