diff --git a/rhodecode/lib/utils2.py b/rhodecode/lib/utils2.py --- a/rhodecode/lib/utils2.py +++ b/rhodecode/lib/utils2.py @@ -54,6 +54,7 @@ from rhodecode.translation import _, _pl from rhodecode.lib.str_utils import safe_str, safe_int, safe_bytes from rhodecode.lib.hash_utils import md5, md5_safe, sha1, sha1_safe from rhodecode.lib.type_utils import aslist, str2bool +from functools import reduce #TODO: there's no longer safe_unicode, we mock it now, but should remove it safe_unicode = safe_str @@ -644,7 +645,7 @@ def obfuscate_url_pw(engine): _url.password = 'XXXXX' except Exception: pass - return unicode(_url) + return str(_url) def get_server_url(environ): @@ -882,7 +883,7 @@ def parse_byte_string(size_str): _parts = match.groups() num, type_ = _parts - return long(num) * {'mb': 1024*1024, 'kb': 1024}[type_.lower()] + return int(num) * {'mb': 1024*1024, 'kb': 1024}[type_.lower()] class CachedProperty(object):