From 7840a165e4d4566f74b826eb379d0c16f77f5907 Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Fri, 1 Oct 2010 21:23:46 +0200 Subject: [PATCH] don't crash if field value is special unicode chars --- weboob/core/backendscfg.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/weboob/core/backendscfg.py b/weboob/core/backendscfg.py index b089bc17..4551e14d 100644 --- a/weboob/core/backendscfg.py +++ b/weboob/core/backendscfg.py @@ -72,6 +72,8 @@ class BackendsConfig(object): raise BackendAlreadyExists(instance_name) config.set(instance_name, '_backend', backend_name) for key, value in params.iteritems(): + if isinstance(value, unicode): + value = value.encode('utf-8') config.set(instance_name, key, value) with open(self.confpath, 'wb') as f: config.write(f)