This line (and also the one 10 below it) causes an empty string to be sent as the HTTP authentication password when there is no API key set. While this "works" and the current API server behavior seems to be equivalent to not specifying an API key / password, i would argue that it is not the correct way to do it and it might result in different server behavior in the future. It is also causing strange logging artifacts, since "" != None.