Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mitogen
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
mitogen
Commits
8054fa86
Commit
8054fa86
authored
Sep 22, 2017
by
David Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only import compiler when necessary, it's not available in 3.x.
parent
aa817f1b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
mitogen/master.py
mitogen/master.py
+8
-7
No files found.
mitogen/master.py
View file @
8054fa86
try
:
import
ast
except
ImportError
:
# ast module is not available in Python 2.4.x, instead we shall use the
# the compiler module as a fallback
ast
=
None
import
commands
import
compiler
import
errno
import
getpass
import
imp
...
...
@@ -27,6 +20,14 @@ import time
import
types
import
zlib
try
:
import
ast
except
ImportError
:
# ast module is not available in Python 2.4.x, instead we shall use the the
# compiler module as a fallback
ast
=
None
import
compiler
if
not
hasattr
(
pkgutil
,
'find_loader'
):
# find_loader() was new in >=2.5, but the modern pkgutil.py syntax has
# been kept intentionally 2.3 compatible so we can reuse it.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment