[meld/meld-1-8] Fix deserialisation of lists with no gconf
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld/meld-1-8] Fix deserialisation of lists with no gconf
- Date: Fri, 13 Dec 2013 22:20:23 +0000 (UTC)
commit e02bc50c2b677688ed38cf682c3dd7211d60fb93
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat Dec 14 08:19:43 2013 +1000
Fix deserialisation of lists with no gconf
meld/util/prefs.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/meld/util/prefs.py b/meld/util/prefs.py
index 891f793..678fc26 100644
--- a/meld/util/prefs.py
+++ b/meld/util/prefs.py
@@ -34,6 +34,7 @@ p.color = "blue"
"""
+import ast
import os
import sys
@@ -226,7 +227,11 @@ class ConfigParserPreferences(object):
for key, value in self._prefs.items():
if self._parser.has_option("DEFAULT", key):
- value.current = self._type_mappings[value.type]("DEFAULT", key)
+ val = self._type_mappings[value.type]("DEFAULT", key)
+ if value.type == "list":
+ value.current = ast.literal_eval(val)
+ else:
+ value.current = val
def __getattr__(self, attr):
return self._prefs[attr].current
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]