Skip to content
Snippets Groups Projects
Commit 00ebde86 authored by Studer Gabriel's avatar Studer Gabriel
Browse files

Fix ost startup scripts

execfile has been replaced by exec in Python 3
parent 4d2eadbf
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,7 @@ if test -e "${OST_SCRIPT}" ; then
fi
done
IFS="#"
$pyexec -c "execfile('$DNG_ROOT/@LIBDIR@/python@PYTHON_VERSION@/site-packages/ost/ost_startup.py')" "${OST_SCRIPT}" $opts
$pyexec -c "exec(open('$DNG_ROOT/@LIBDIR@/python@PYTHON_VERSION@/site-packages/ost/ost_startup.py').read())" "${OST_SCRIPT}" $opts
RC=$?
else
opts=""
......@@ -59,7 +59,7 @@ else
fi
done
IFS="#"
$pyexec $interactive -c "execfile('$DNG_ROOT/@LIBDIR@/python@PYTHON_VERSION@/site-packages/ost/ost_startup.py')" $opts
$pyexec $interactive -c "exec(open('$DNG_ROOT/@LIBDIR@/python@PYTHON_VERSION@/site-packages/ost/ost_startup.py').read())" $opts
RC=$?
fi
IFS=$OLDIFS
......
......@@ -73,7 +73,7 @@ home = os.getenv('HOME') or os.getenv('USERPROFILE')
_ostrc=os.path.join(home, '.ostrc')
if os.path.exists(_ostrc):
try:
exec(open(_ostrc))
exec(compile(open(_ostrc).read(), _ostrc, 'exec'))
except Exception as e:
print(e)
PushVerbosityLevel(options.vlevel)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment