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

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

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 14 Jan 2018 13:41:30 +0100
branch
maintenance
changeset 6067
fda50ed9a790
parent 6065
fb0a1b8b0f82
child 6071
e9bda9b4260b

Fixed an issue in AdBlockRule.py caused by using an enum type that was not yet defined in Python prior 3.6.
(grafted from 4f0d9d659cf5414a8f788c962097e61d6a4c7eda)

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