Unicode os.walk as backup

This commit is contained in:
Ruud
2012-02-11 21:52:31 +01:00
parent 9090f3ac69
commit e769c5e595
2 changed files with 21 additions and 9 deletions
+2 -2
View File
@@ -91,7 +91,7 @@ class Settings(object):
return tryInt(self.p.get(section, option))
def getUnicode(self, section, option):
value = self.p.get(section, option)
value = self.p.get(section, option).decode('unicode_escape')
return toUnicode(value).strip()
def getValues(self):
@@ -153,7 +153,7 @@ class Settings(object):
# See if a value handler is attached, use that as value
new_value = fireEvent('setting.save.%s.%s' % (section, option), value, single = True)
self.set(section, option, new_value if new_value else value)
self.set(section, option, (new_value if new_value else value).encode('unicode_escape'))
self.save()
return jsonified({