Commit 8054fa86 authored by David Wilson's avatar David Wilson

Only import compiler when necessary, it's not available in 3.x.

parent aa817f1b
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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment