From 9614b2613729f51231bf9e2f504adda58637d328 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 23 Aug 2013 17:46:52 +0530 Subject: [PATCH] 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) --- src/calibre/library/server/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/library/server/base.py b/src/calibre/library/server/base.py index f2598aa3d9..0fc301662f 100644 --- a/src/calibre/library/server/base.py +++ b/src/calibre/library/server/base.py @@ -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)