summaryrefslogtreecommitdiffstats
path: root/forum/auth.py
diff options
context:
space:
mode:
authorAdolfo Fitoria <fitoria@fitoria-laptop.(none)>2009-08-06 00:00:13 +0800
committerMike Chen <chagel@gmail.com>2009-08-09 11:39:49 +0800
commit09b805b00f25fe6a5509334f9091332d89e7d40d (patch)
treeb73a4ea4cb57c05bbbb6a89993dd6112cbc25c5d /forum/auth.py
parente6d0c3145ca5447ede865e8145423cf5621a226a (diff)
downloadaskbot-09b805b00f25fe6a5509334f9091332d89e7d40d.tar.gz
askbot-09b805b00f25fe6a5509334f9091332d89e7d40d.tar.bz2
askbot-09b805b00f25fe6a5509334f9091332d89e7d40d.zip
fixing if and elses that have issues with python 2.4
Signed-off-by: Mike Chen <chagel@gmail.com>
Diffstat (limited to 'forum/auth.py')
-rw-r--r--forum/auth.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/forum/auth.py b/forum/auth.py
index 0608031a..082f5186 100644
--- a/forum/auth.py
+++ b/forum/auth.py
@@ -167,7 +167,10 @@ def can_upload_files(request_user):
###########################################
def calculate_reputation(origin, offset):
result = int(origin) + int(offset)
- return result if result > 0 else 1
+ if (result > 0):
+ return result
+ else:
+ return 1
@transaction.commit_on_success
def onFlaggedItem(item, post, user):