diff --git a/src/calibre/srv/auth.py b/src/calibre/srv/auth.py index d1dec5f540..d83dbbbedc 100644 --- a/src/calibre/srv/auth.py +++ b/src/calibre/srv/auth.py @@ -238,8 +238,7 @@ class AuthController(object): if not nonce_is_stale: data.username = da.username return - else: - log_msg = 'Failed login attempt from: %s' % data.remote_addr + log_msg = 'Failed login attempt from: %s' % data.remote_addr elif self.prefer_basic_auth and scheme == 'basic': try: un, pw = base64_decode(rest.strip()).partition(':')[::2] @@ -250,8 +249,7 @@ class AuthController(object): if self.check(un, pw): data.username = un return - else: - log_msg = 'Failed login attempt from: %s' % data.remote_addr + log_msg = 'Failed login attempt from: %s' % data.remote_addr else: raise HTTPSimpleResponse(httplib.BAD_REQUEST, 'Unsupported authentication method') diff --git a/src/calibre/srv/http_response.py b/src/calibre/srv/http_response.py index 8b959d1c39..0dde4d5c84 100644 --- a/src/calibre/srv/http_response.py +++ b/src/calibre/srv/http_response.py @@ -551,7 +551,7 @@ class HTTPConnection(HTTPRequest): return if isinstance(output, ReadableOutput): self.use_sendfile = output.use_sendfile and self.opts.use_sendfile and sendfile_to_socket_async is not None and self.ssl_context is None - # sendfile() does nto work with SSL sockets since encryption has to + # sendfile() does not work with SSL sockets since encryption has to # be done in userspace if output.ranges is not None: if isinstance(output.ranges, Range):