From 957bd0512feb771268f3258506c7037bf3a77421 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 19 Jun 2012 18:28:45 +0530 Subject: [PATCH] ... --- src/calibre/library/prefs.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/library/prefs.py b/src/calibre/library/prefs.py index 4514f4cf1e..56c1ba55db 100644 --- a/src/calibre/library/prefs.py +++ b/src/calibre/library/prefs.py @@ -65,6 +65,9 @@ class DBPrefs(dict): return default def set_namespaced(self, namespace, key, val): + if u':' in key: raise KeyError('Colons are not allowed in keys') + if u':' in namespace: raise KeyError('Colons are not allowed in' + ' the namespace') key = u'namespaced:%s:%s'%(namespace, key) self[key] = val