mirror of
https://github.com/gryf/wicd.git
synced 2026-01-06 13:54:17 +01:00
Fix translation of dbus.String
This commit is contained in:
@@ -430,7 +430,10 @@ def sanitize_config(s):
|
|||||||
""" Sanitize property names to be used in config-files. """
|
""" Sanitize property names to be used in config-files. """
|
||||||
allowed = string.ascii_letters + '_' + string.digits
|
allowed = string.ascii_letters + '_' + string.digits
|
||||||
table = string.maketrans(allowed, ' ' * len(allowed))
|
table = string.maketrans(allowed, ' ' * len(allowed))
|
||||||
return s.translate(None, table)
|
|
||||||
|
# s is a dbus.String -- since we don't allow unicode property keys,
|
||||||
|
# make it simple.
|
||||||
|
return str(s).translate(None, table)
|
||||||
|
|
||||||
def sanitize_escaped(s):
|
def sanitize_escaped(s):
|
||||||
""" Sanitize double-escaped unicode strings. """
|
""" Sanitize double-escaped unicode strings. """
|
||||||
|
|||||||
Reference in New Issue
Block a user