summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dickreuter <dickreuter@gmail.com>2019-01-19 18:24:54 +0000
committerClaudiu Popa <pcmanticore@gmail.com>2019-01-20 09:20:30 -0600
commit8a3560ab406e91647c326c29536b6da9798cb08d (patch)
treecd42a3da7af504d657065b1adb943bd1bb25e60e
parent9cd65bd081b5d41a7d70e33c4ec4024e4d556813 (diff)
downloadpylint-git-8a3560ab406e91647c326c29536b6da9798cb08d.tar.gz
remove popping for all versions
-rw-r--r--ChangeLog2
-rw-r--r--pylint/lint.py6
2 files changed, 2 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 4e065a0f9..c48759e8b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -83,7 +83,7 @@ Release date: TBA
Previous version incorrectly detects `a < b < c and b < d` and fails to
detect `a < b < c and c < d`.
- * Avoid popping __main__ when using multiple jobs for python >= 3.3
+ * Avoid popping __main__ when using multiple jobs
Close #2689
diff --git a/pylint/lint.py b/pylint/lint.py
index a86471367..407f934ab 100644
--- a/pylint/lint.py
+++ b/pylint/lint.py
@@ -146,11 +146,7 @@ def _patch_sysmodules():
if mock_main:
sys.modules["__main__"] = sys.modules[__name__]
- try:
- yield
- finally:
- if mock_main and sys.version_info < (3, 3):
- sys.modules.pop("__main__")
+ yield
# Python Linter class #########################################################