diff -r 0b936ff1bbb9 -r a2bc06a54d9d src/eric7/WebBrowser/CookieJar/CookieExceptionsModel.py --- a/src/eric7/WebBrowser/CookieJar/CookieExceptionsModel.py Sun Nov 06 11:22:39 2022 +0100 +++ b/src/eric7/WebBrowser/CookieJar/CookieExceptionsModel.py Mon Nov 07 17:19:58 2022 +0100 @@ -47,14 +47,9 @@ if role == Qt.ItemDataRole.SizeHintRole: fm = QFontMetrics(QFont()) height = fm.height() + fm.height() // 3 - try: - width = fm.horizontalAdvance( - self.headerData(section, orientation, Qt.ItemDataRole.DisplayRole) - ) - except AttributeError: - width = fm.width( - self.headerData(section, orientation, Qt.ItemDataRole.DisplayRole) - ) + width = fm.horizontalAdvance( + self.headerData(section, orientation, Qt.ItemDataRole.DisplayRole) + ) return QSize(width, height) if ( @@ -194,11 +189,11 @@ @param rule type of rule to add (CookieJar.Allow, CookieJar.Block or CookieJar.AllowForSession) """ + from .CookieJar import CookieJar + if not host: return - from .CookieJar import CookieJar - if rule == CookieJar.Allow: self.__addHost( host,