summaryrefslogtreecommitdiff
path: root/src/python
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2009-09-22 15:24:16 -0700
committerNathan Binkert <nate@binkert.org>2009-09-22 15:24:16 -0700
commitaa78db4adab413600547dc01a9f1db2fbbe8fa44 (patch)
treed98e6a57b37d9e0c4d2f3c8ec2b82b05bd5bbc82 /src/python
parentb7094ec38b8ec2f4de1fdf3d60a0f5953efa3e06 (diff)
downloadgem5-aa78db4adab413600547dc01a9f1db2fbbe8fa44.tar.xz
code_formatter: use __builtin__ which is correct, not __builtins__
Diffstat (limited to 'src/python')
-rw-r--r--src/python/m5/util/code_formatter.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/python/m5/util/code_formatter.py b/src/python/m5/util/code_formatter.py
index 919a6423b..396fe0e52 100644
--- a/src/python/m5/util/code_formatter.py
+++ b/src/python/m5/util/code_formatter.py
@@ -24,6 +24,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+import __builtin__
import inspect
import os
import re
@@ -64,8 +65,8 @@ class lookup(object):
if self.formatter.globals and item in self.frame.f_globals:
return self.frame.f_globals[item]
- if item in __builtins__:
- return __builtins__[item]
+ if item in __builtin__.__dict__:
+ return __builtin__.__dict__[item]
try:
item = int(item)