diff options
author | Steve Reinhardt <steve.reinhardt@amd.com> | 2014-11-23 18:00:47 -0800 |
---|---|---|
committer | Steve Reinhardt <steve.reinhardt@amd.com> | 2014-11-23 18:00:47 -0800 |
commit | 252a463b6beadd6c12afdaa4650fde08ee82067a (patch) | |
tree | b53c3da4cfa9886f3502259c7b8bb011f616c1f9 /configs/ruby | |
parent | 12243a3835272255940389ea3a749a34613f6d96 (diff) | |
download | gem5-252a463b6beadd6c12afdaa4650fde08ee82067a.tar.xz |
Backed out prior changeset f9fb64a72259
Back out use of importlib to avoid implicitly creating
dependency on Python 2.7.
Diffstat (limited to 'configs/ruby')
-rw-r--r-- | configs/ruby/Ruby.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/configs/ruby/Ruby.py b/configs/ruby/Ruby.py index 98df027dc..44d6bdfcc 100644 --- a/configs/ruby/Ruby.py +++ b/configs/ruby/Ruby.py @@ -39,7 +39,6 @@ # # Authors: Brad Beckmann -import importlib import math import m5 from m5.objects import * @@ -183,15 +182,15 @@ def create_system(options, full_system, system, piobus = None, dma_ports = []): routers = [], ext_links = [], int_links = [], netifs = []) ruby.network = network - protocol_name = buildEnv['PROTOCOL'] - protocol = importlib.import_module(protocol_name) + protocol = buildEnv['PROTOCOL'] + exec "import %s" % protocol try: (cpu_sequencers, dir_cntrls, topology) = \ - protocol.create_system(options, full_system, system, dma_ports, - ruby) + eval("%s.create_system(options, full_system, system, dma_ports,\ + ruby)" + % protocol) except: - print "Error: could not create sytem for ruby protocol %s" % \ - protocol_name + print "Error: could not create sytem for ruby protocol %s" % protocol raise # Create a port proxy for connecting the system port. This is |