Fixed an issue in AdBlockRule.py caused by using an enum type that was not yet defined in Python prior 3.6.

Sun, 14 Jan 2018 13:41:30 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 14 Jan 2018 13:41:30 +0100
changeset 6066
4f0d9d659cf5
parent 6064
32a8b51c89da
child 6068
97a787b53663

Fixed an issue in AdBlockRule.py caused by using an enum type that was not yet defined in Python prior 3.6.

WebBrowser/AdBlock/AdBlockRule.py file | annotate | diff | comparison | revisions
--- a/WebBrowser/AdBlock/AdBlockRule.py	Sun Jan 14 12:03:34 2018 +0100
+++ b/WebBrowser/AdBlock/AdBlockRule.py	Sun Jan 14 13:41:30 2018 +0100
@@ -11,7 +11,7 @@
 
 import re
 
-from enum import IntFlag
+from enum import IntEnum
 
 from PyQt5.QtCore import PYQT_VERSION, Qt, QRegExp
 from PyQt5.QtWebEngineCore import QWebEngineUrlRequestInfo
@@ -44,7 +44,7 @@
     return domain + topLevelDomain
 
 
-class AdBlockRuleType(IntFlag):
+class AdBlockRuleType(IntEnum):
     """
     Class implementing the rule type enum.
     """
@@ -57,7 +57,7 @@
     Invalid = 6
 
 
-class AdBlockRuleOption(IntFlag):
+class AdBlockRuleOption(IntEnum):
     """
     Class implementing the rule option enum.
     """
@@ -75,7 +75,7 @@
     MediaOption = 1024
     FontOption = 2048
     OtherOption = 4096
-
+    
     # Exception only options
     DocumentOption = 8192
     ElementHideOption = 16384

eric ide

mercurial