summaryrefslogtreecommitdiff
path: root/wsgitools/digest.py
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2009-03-29 23:21:43 +0200
committerHelmut Grohne <helmut@subdivi.de>2009-03-29 23:21:43 +0200
commit58149dfd3d67399a47dbf3035ab0f5a866abcd23 (patch)
tree34c5cc6092a2863980b6feb5d7298ad5559302cc /wsgitools/digest.py
parent5c0a3965cdb9cac87d0b0ea773a6276c73a27ba6 (diff)
downloadwsgitools-58149dfd3d67399a47dbf3035ab0f5a866abcd23.tar.gz
get rid of old builtin long
Even Py2.4 can handle large parameters to int, so long is not needed.
Diffstat (limited to 'wsgitools/digest.py')
-rwxr-xr-xwsgitools/digest.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/wsgitools/digest.py b/wsgitools/digest.py
index a4d2e4f..cbd374b 100755
--- a/wsgitools/digest.py
+++ b/wsgitools/digest.py
@@ -10,10 +10,6 @@ except ImportError:
import binascii
import base64
import time
-try:
- long
-except NameError:
- long = int
sysrand = random.SystemRandom()
@@ -135,7 +131,7 @@ def format_time(seconds):
@type seconds: float
@rtype: str
"""
- return "%13X" % long(seconds * 1000000)
+ return "%13X" % int(seconds * 1000000)
__all__.append("StatelessNonceStore")
class StatelessNonceStore(NonceStoreBase):
@@ -436,7 +432,7 @@ class AuthDigestMiddleware:
noncecount = 1
if credentials.get("qop") is not None:
# raises ValueError
- noncecount = long(credentials["nc"], 16)
+ noncecount = int(credentials["nc"], 16)
if not self.noncestore.checknonce(credentials["nonce"], noncecount):
return self.authorization_required(environ, start_response,