--- a/eric6/WebBrowser/Network/NetworkManager.py Wed Apr 21 19:40:50 2021 +0200 +++ b/eric6/WebBrowser/Network/NetworkManager.py Thu Apr 22 18:02:47 2021 +0200 @@ -278,14 +278,13 @@ realm = auth.realm() if not realm and 'realm' in auth.options(): realm = auth.option("realm") - if realm: - info = self.tr( - "<b>Enter username and password for '{0}', realm '{1}'</b>" - ).format(urlRoot, realm) - else: - info = self.tr( - "<b>Enter username and password for '{0}'</b>" - ).format(urlRoot) + info = ( + self.tr("<b>Enter username and password for '{0}', realm '{1}'</b>" + ).format(urlRoot, realm) + if realm else + self.tr("<b>Enter username and password for '{0}'</b>" + ).format(urlRoot) + ) from UI.AuthenticationDialog import AuthenticationDialog import WebBrowser.WebBrowserWindow