wok annotate wicd/stuff/dbus_string_fix.patch @ rev 19642

linld: fix cpuhaslm
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Jan 21 09:21:18 2017 +0100 (2017-01-21)
parents
children
rev   line source
mojo@14649 1 === modified file 'wicd/misc.py'
mojo@14649 2 --- wicd/misc.py 2012-04-30 19:20:47 +0000
mojo@14649 3 +++ wicd/misc.py 2012-05-03 16:01:49 +0000
mojo@14649 4 @@ -430,7 +430,10 @@
mojo@14649 5 """ Sanitize property names to be used in config-files. """
mojo@14649 6 allowed = string.ascii_letters + '_' + string.digits
mojo@14649 7 table = string.maketrans(allowed, ' ' * len(allowed))
mojo@14649 8 - return s.translate(None, table)
mojo@14649 9 +
mojo@14649 10 + # s is a dbus.String -- since we don't allow unicode property keys,
mojo@14649 11 + # make it simple.
mojo@14649 12 + return str(s).translate(None, table)
mojo@14649 13
mojo@14649 14 def sanitize_escaped(s):
mojo@14649 15 """ Sanitize double-escaped unicode strings. """