set __name__ in the root m5 script to __m5_main__ so we can
tell if the script is run from m5 as the m5 script --HG-- extra : convert_revision : 06f646cbb8c82444ef345115aa49324a4d3a2c9f
This commit is contained in:
parent
e9a395c2ce
commit
e6b4fed75d
1 changed files with 2 additions and 1 deletions
|
@ -304,7 +304,8 @@ def main():
|
|||
sys.argv = arguments
|
||||
sys.path = [ os.path.dirname(sys.argv[0]) ] + sys.path
|
||||
|
||||
scope = { '__file__' : sys.argv[0] }
|
||||
scope = { '__file__' : sys.argv[0],
|
||||
'__name__' : '__m5_main__' }
|
||||
|
||||
# we want readline if we're doing anything interactive
|
||||
if options.interactive or options.pdb:
|
||||
|
|
Loading…
Reference in a new issue