mirror of
https://github.com/Kozea/Radicale.git
synced 2025-09-12 20:30:57 +00:00
Fix compatibility between python2 and 3
This commit is contained in:
parent
6c40f5e24a
commit
a631c8c761
5 changed files with 18 additions and 11 deletions
|
@ -272,9 +272,9 @@ class Application(object):
|
|||
|
||||
if authorization:
|
||||
authorization = \
|
||||
authorization.lstrip("Basic").strip().encode("ascii")
|
||||
user, password = self.decode(
|
||||
base64.b64decode(authorization), environ).split(":", 1)
|
||||
authorization.decode("ascii").lstrip("Basic").strip()
|
||||
user, password = self.decode(base64.b64decode(
|
||||
authorization.encode("ascii")), environ).split(":", 1)
|
||||
else:
|
||||
user = password = None
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue