summaryrefslogtreecommitdiff
blob: 2fddc9a2e55f1cf4bcacf85e298826b6c5fd6325 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
=== modified file 'wicd/misc.py'
--- wicd/misc.py	2012-04-30 19:20:47 +0000
+++ wicd/misc.py	2012-05-03 16:01:49 +0000
@@ -430,7 +430,10 @@
     """ Sanitize property names to be used in config-files. """
     allowed = string.ascii_letters + '_' + string.digits
     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):
     """ Sanitize double-escaped unicode strings. """