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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
c1a789e1
Verified
Commit
c1a789e1
authored
1 year ago
by
Xavier Robin
Browse files
Options
Downloads
Patches
Plain Diff
feat: SCHWED-5913 make invalid $OST_COMPOUNDS_CHEMLIB an error
parent
df8c9696
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/base/pymod/__init__.py.in
+8
-9
8 additions, 9 deletions
modules/base/pymod/__init__.py.in
with
8 additions
and
9 deletions
modules/base/pymod/__init__.py.in
+
8
−
9
View file @
c1a789e1
...
...
@@ -87,15 +87,14 @@ def _SetupCompoundsLib():
"""
# Try with the $OST_COMPOUNDS_CHEMLIB environment variable
compound_lib_path = os.getenv("OST_COMPOUNDS_CHEMLIB")
try:
_TrySetCompoundsLib(compound_lib_path)
except ValueError:
if compound_lib_path:
LogWarning("Could not load $OST_COMPOUNDS_CHEMLIB as a compound library"
": '%s'. Falling back to default." % ( compound_lib_path))
pass
else:
return
if compound_lib_path:
compound_lib = conop.CompoundLib.Load(compound_lib_path)
if compound_lib is None:
raise RuntimeError("Could not load $OST_COMPOUNDS_CHEMLIB as a compound "
"library: '%s'." % compound_lib_path)
else:
conop.SetDefaultLib(compound_lib)
return
# Try from GetSharedDataPath() - requires $OST_ROOT to be set.
try:
...
...
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
register
or
sign in
to comment