wok-6.x diff wicd/stuff/dbus_string_fix.patch @ rev 18305

Up: bogofilter (1.2.4)
author Christophe Lincoln <pankso@slitaz.org>
date Mon Aug 24 09:12:53 2015 +0200 (2015-08-24)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/wicd/stuff/dbus_string_fix.patch	Mon Aug 24 09:12:53 2015 +0200
     1.3 @@ -0,0 +1,15 @@
     1.4 +=== modified file 'wicd/misc.py'
     1.5 +--- wicd/misc.py	2012-04-30 19:20:47 +0000
     1.6 ++++ wicd/misc.py	2012-05-03 16:01:49 +0000
     1.7 +@@ -430,7 +430,10 @@
     1.8 +     """ Sanitize property names to be used in config-files. """
     1.9 +     allowed = string.ascii_letters + '_' + string.digits
    1.10 +     table = string.maketrans(allowed, ' ' * len(allowed))
    1.11 +-    return s.translate(None, table)
    1.12 ++
    1.13 ++    # s is a dbus.String -- since we don't allow unicode property keys,
    1.14 ++    # make it simple.
    1.15 ++    return str(s).translate(None, table)
    1.16 +
    1.17 + def sanitize_escaped(s):
    1.18 +     """ Sanitize double-escaped unicode strings. """