Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble-scripts.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Hacker <dd0t@users.sourceforge.net>2011-02-22 21:15:56 +0300
committerStefan Hacker <dd0t@users.sourceforge.net>2011-02-22 21:15:56 +0300
commit89080fb4d5a1da5cd0013e8697caafd74fffb1ce (patch)
treee27d0977f4b7e412e75512b0baf7d921d5156fe7 /Authenticators
parentc1d7df9ae89fb045d8437d270362aef6d8411439 (diff)
Restore python 2.4 compatibility of phpBB3auth and smfauth
Diffstat (limited to 'Authenticators')
-rwxr-xr-xAuthenticators/SMF/smfauth.py9
-rwxr-xr-xAuthenticators/phpBB3/phpBB3auth.py9
2 files changed, 14 insertions, 4 deletions
diff --git a/Authenticators/SMF/smfauth.py b/Authenticators/SMF/smfauth.py
index 1caf958..a060e1a 100755
--- a/Authenticators/SMF/smfauth.py
+++ b/Authenticators/SMF/smfauth.py
@@ -458,13 +458,18 @@ def do_main_program():
self.app.connected = False
debug('Server shutdown stopped a virtual server')
-
+
+ if cfg.user.reject_on_error: # Python 2.4 compat
+ authenticateFortifyResult = (-1, None, None)
+ else:
+ authenticateFortifyResult = (-2, None, None)
+
class smfauthenticator(Murmur.ServerUpdatingAuthenticator):
texture_cache = {}
def __init__(self):
Murmur.ServerUpdatingAuthenticator.__init__(self)
- @fortifyIceFu((-1 if cfg.user.reject_on_error else -2, None, None))
+ @fortifyIceFu(authenticateFortifyResult)
@checkSecret
def authenticate(self, name, pw, certlist, certhash, strong, current = None):
"""
diff --git a/Authenticators/phpBB3/phpBB3auth.py b/Authenticators/phpBB3/phpBB3auth.py
index fa1b9ef..92df4e1 100755
--- a/Authenticators/phpBB3/phpBB3auth.py
+++ b/Authenticators/phpBB3/phpBB3auth.py
@@ -432,13 +432,18 @@ def do_main_program():
self.app.connected = False
debug('Server shutdown stopped a virtual server')
-
+
+ if cfg.user.reject_on_error: # Python 2.4 compat
+ authenticateFortifyResult = (-1, None, None)
+ else:
+ authenticateFortifyResult = (-2, None, None)
+
class phpBBauthenticator(Murmur.ServerUpdatingAuthenticator):
texture_cache = {}
def __init__(self):
Murmur.ServerUpdatingAuthenticator.__init__(self)
- @fortifyIceFu((-1 if cfg.user.reject_on_error else -2, None, None))
+ @fortifyIceFu(authenticateFortifyResult)
@checkSecret
def authenticate(self, name, pw, certlist, certhash, strong, current = None):
"""