summaryrefslogtreecommitdiff
path: root/__main__.py
diff options
context:
space:
mode:
Diffstat (limited to '__main__.py')
-rw-r--r--__main__.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/__main__.py b/__main__.py
index c998e1d..f1f2b4f 100644
--- a/__main__.py
+++ b/__main__.py
@@ -8,12 +8,5 @@ import os
PKG = 'coverage'
-try:
- run_globals = runpy.run_module(PKG, run_name='__main__', alter_sys=True)
- executed = os.path.splitext(os.path.basename(run_globals['__file__']))[0]
- if executed != '__main__': # For Python 2.5 compatibility
- raise ImportError(
- 'Incorrectly executed %s instead of __main__' % executed
- )
-except ImportError: # For Python 2.6 compatibility
- runpy.run_module('%s.__main__' % PKG, run_name='__main__', alter_sys=True)
+run_globals = runpy.run_module(PKG, run_name='__main__', alter_sys=True)
+executed = os.path.splitext(os.path.basename(run_globals['__file__']))[0]