Fix regression in content server - exception raised when starting from the GUI because the restriction option isn't there.

This commit is contained in:
Charles Haley 2010-08-18 22:42:56 +01:00
parent 96e936e9c5
commit 8b452ac88b

View File

@ -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