--- a/eric6/WebBrowser/Passwords/PasswordManager.py Wed Apr 21 19:40:50 2021 +0200 +++ b/eric6/WebBrowser/Passwords/PasswordManager.py Thu Apr 22 18:02:47 2021 +0200 @@ -127,11 +127,11 @@ authority = url.authority() if authority.startswith("@"): authority = authority[1:] - if realm: - key = "{0}://{1} ({2})".format( - url.scheme(), authority, realm) - else: - key = "{0}://{1}".format(url.scheme(), authority) + key = ( + "{0}://{1} ({2})".format(url.scheme(), authority, realm) + if realm else + "{0}://{1}".format(url.scheme(), authority) + ) return key def getFileName(self):