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 ...@@ -47,7 +47,7 @@ if test -e "${OST_SCRIPT}" ; then
fi fi
done done
IFS="#" 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=$? RC=$?
else else
opts="" opts=""
...@@ -59,7 +59,7 @@ else ...@@ -59,7 +59,7 @@ else
fi fi
done done
IFS="#" 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=$? RC=$?
fi fi
IFS=$OLDIFS IFS=$OLDIFS
......
...@@ -73,7 +73,7 @@ home = os.getenv('HOME') or os.getenv('USERPROFILE') ...@@ -73,7 +73,7 @@ home = os.getenv('HOME') or os.getenv('USERPROFILE')
_ostrc=os.path.join(home, '.ostrc') _ostrc=os.path.join(home, '.ostrc')
if os.path.exists(_ostrc): if os.path.exists(_ostrc):
try: try:
exec(open(_ostrc)) exec(compile(open(_ostrc).read(), _ostrc, 'exec'))
except Exception as e: except Exception as e:
print(e) print(e)
PushVerbosityLevel(options.vlevel) PushVerbosityLevel(options.vlevel)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment