From 10f06322393f8d88d87fd97d0996fde4e5e71362 Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Tue, 16 Apr 2013 23:50:48 +0200 Subject: [PATCH] config: Encode any unicode passwords if found --- mopidy/config/types.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mopidy/config/types.py b/mopidy/config/types.py index f8614efd..29c41ae2 100644 --- a/mopidy/config/types.py +++ b/mopidy/config/types.py @@ -100,6 +100,8 @@ class Secret(ConfigValue): return value def serialize(self, value, display=False): + if isinstance(value, unicode): + value = value.encode('utf-8') if value is None: return b'' elif display: