From 8b452ac88be6231b28e7aa49d2572564df05bbd2 Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Wed, 18 Aug 2010 22:42:56 +0100 Subject: [PATCH] Fix regression in content server - exception raised when starting from the GUI because the restriction option isn't there. --- src/calibre/library/server/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/library/server/base.py b/src/calibre/library/server/base.py index 7f808b008c..e949c712d4 100644 --- a/src/calibre/library/server/base.py +++ b/src/calibre/library/server/base.py @@ -95,8 +95,8 @@ class LibraryServer(ContentServer, MobileServer, XMLServer, OPDSServer, Cache): 'tools.digest_auth.users' : {opts.username.strip():opts.password.strip()}, } - sr = db.prefs.get('cs_restriction', '') if opts.restriction is None \ - else opts.restriction + sr = getattr(opts, 'restriction', None) + sr = db.prefs.get('cs_restriction', '') if sr is None else sr self.set_search_restriction(sr) self.is_running = False