Commit 178882b1 authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

snf-common: Fix python2.6 compatibility

parent a040b4e1
...@@ -71,8 +71,10 @@ UNQUOTE_EXCEPTIONS = { ...@@ -71,8 +71,10 @@ UNQUOTE_EXCEPTIONS = {
'fragment': ' +#' 'fragment': ' +#'
} }
_hextochr = {'%02x' % i: chr(i) for i in range(256)} #_hextochr = {'%02x' % i: chr(i) for i in range(256)}
_hextochr.update({'%02X' % i: chr(i) for i in range(256)}) #_hextochr.update({'%02X' % i: chr(i) for i in range(256)})
_hextochr = dict(('%02x' % i, chr(i)) for i in range(256))
_hextochr.update(dict(('%02X' % i, chr(i)) for i in range(256)))
_idna_encode = lambda x: x.decode('utf-8').encode('idna') _idna_encode = lambda x: x.decode('utf-8').encode('idna')
_idna_decode = lambda x: x.decode('idna').encode('utf-8') _idna_decode = lambda x: x.decode('idna').encode('utf-8')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment