Content server: Fix blank username causing error on startup

Fixes #1215893 [attempted to start server and recieved an error](https://bugs.launchpad.net/calibre/+bug/1215893)
This commit is contained in:
Kovid Goyal 2013-08-23 17:46:52 +05:30
parent da8910bd90
commit 9614b26137

View File

@ -185,7 +185,7 @@ class LibraryServer(ContentServer, MobileServer, XMLServer, OPDSServer, Cache,
'text/xml', 'text/javascript', 'text/css'],
}
if opts.password:
if opts.username and opts.password:
self.users_dict[opts.username.strip()] = opts.password.strip()
auth_controller = AuthController('Your calibre library',
self.users_dict)