summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Noel <GregNoel@tigris.org>2008-09-09 23:44:59 (GMT)
committerGreg Noel <GregNoel@tigris.org>2008-09-09 23:44:59 (GMT)
commit8a58021f70ab5b6b13835ac310a91d4cd0410e5b (patch)
treed477a183578e6a850af3845306658b1a73b34d06
parentee867ba80a9bfa6cba5788ccb9591718036ac197 (diff)
downloadSCons-8a58021f70ab5b6b13835ac310a91d4cd0410e5b.zip
SCons-8a58021f70ab5b6b13835ac310a91d4cd0410e5b.tar.gz
SCons-8a58021f70ab5b6b13835ac310a91d4cd0410e5b.tar.bz2
Issue 1913: use cProfile instead of profile if available
-rw-r--r--src/engine/SCons/Script/Main.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py
index 96b18a4..4a4dd84 100644
--- a/src/engine/SCons/Script/Main.py
+++ b/src/engine/SCons/Script/Main.py
@@ -1186,7 +1186,10 @@ def _exec_main(parser, values):
import pdb
pdb.Pdb().runcall(_main, parser)
elif options.profile_file:
- from profile import Profile
+ try:
+ from cProfile import Profile
+ except ImportError, e:
+ from profile import Profile
# Some versions of Python 2.4 shipped a profiler that had the
# wrong 'c_exception' entry in its dispatch table. Make sure