Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
00ebde86
Commit
00ebde86
authored
Nov 15, 2019
by
Studer Gabriel
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/ost.in
+2
-2
2 additions, 2 deletions
scripts/ost.in
scripts/ost_startup.py.in
+1
-1
1 addition, 1 deletion
scripts/ost_startup.py.in
with
3 additions
and
3 deletions
scripts/ost.in
+
2
−
2
View file @
00ebde86
...
@@ -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
"exec
file
('
$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
"exec
file
('
$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
...
...
This diff is collapsed.
Click to expand it.
scripts/ost_startup.py.in
+
1
−
1
View file @
00ebde86
...
@@ -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)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment