mirror of
https://github.com/cemu-project/idapython.git
synced 2025-02-17 18:36:23 +01:00
init.py: runscript() now works on Python 2.6 too. Thanks to Christian Blichmann for the patch.
This commit is contained in:
parent
013546b569
commit
ab34ed6573
@ -61,7 +61,7 @@ def runscript(script):
|
||||
sys.argv = [ script ]
|
||||
# Adjust the __file__ path in the globals we pass to the script
|
||||
g = globals()
|
||||
old__file__ = g['__file__']
|
||||
old__file__ = g['__file__'] if '__file__' in g else ''
|
||||
g['__file__'] = script
|
||||
try:
|
||||
execfile(script, g)
|
||||
|
Loading…
x
Reference in New Issue
Block a user