summaryrefslogtreecommitdiffstats
path: root/deluge/ui/web/auth.py
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2017-02-12 11:26:31 +0000
committerCalum Lind <calumlind+deluge@gmail.com>2017-02-22 12:36:32 +0000
commit84802da29b71679547ba245ea3d870512dba3b49 (patch)
treecc47027c315fff47d567745af381828afaed6a1b /deluge/ui/web/auth.py
parent011afe3e899451059113cf105f1d961312116701 (diff)
downloaddeluge-84802da29b71679547ba245ea3d870512dba3b49.tar.gz
deluge-84802da29b71679547ba245ea3d870512dba3b49.tar.bz2
deluge-84802da29b71679547ba245ea3d870512dba3b49.zip
[Py2to3] Force unicode_literals and fix related issues
* Added `from __future__ import unicode_literals` to every file so now all strings in code are forced to be unicode strings unless marked as byte string `b'str'` or encoded to byte string `'str'.encode('utf-8')`. This is a large change but we have been working towards the goal of unicode strings passed in the code so decoding external input and encoding output as byte strings (where applicable). Note that in Python 2 the `str` type still refers to byte strings. * Replaced the use of `str` for `basestring` in isinstance comparison as this was the original intention but breaks code when encoutering unicode strings. * Marked byte strings in gtkui as the conversion to utf8 is not always handled, mostly related to gobject signal names.
Diffstat (limited to 'deluge/ui/web/auth.py')
-rw-r--r--deluge/ui/web/auth.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/deluge/ui/web/auth.py b/deluge/ui/web/auth.py
index 6e98e579b..1386ae897 100644
--- a/deluge/ui/web/auth.py
+++ b/deluge/ui/web/auth.py
@@ -7,6 +7,8 @@
# See LICENSE for more details.
#
+from __future__ import unicode_literals
+
import hashlib
import logging
import os