Skip to content

Commit

Permalink
Fix #41 (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwthompson authored Jun 16, 2022
1 parent 7d543df commit 3b56fcc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion devtools/conda-envs/test_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies:
- pip

### Core dependencies.
- openff-utilities
- openff-utilities >=0.1.5
- pydantic

- click
Expand Down
10 changes: 5 additions & 5 deletions nagl/utilities/toolkits.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from typing import TYPE_CHECKING, Generator, List, Literal, overload

from openff.utilities import requires_package
from openff.utilities.utilities import MissingOptionalDependency
from openff.utilities.exceptions import MissingOptionalDependencyError

from nagl import data

Expand Down Expand Up @@ -102,7 +102,7 @@ def stream_from_file(file_path: str, as_smiles: bool = False):
try:
for molecule in _oe_stream_from_file(file_path, as_smiles):
yield molecule
except MissingOptionalDependency:
except MissingOptionalDependencyError:
for molecule in _rdkit_stream_from_file(file_path, as_smiles):
yield molecule

Expand Down Expand Up @@ -148,7 +148,7 @@ def stream_to_file(file_path: str):
try:
with _oe_stream_to_file(file_path) as writer:
yield writer
except MissingOptionalDependency:
except MissingOptionalDependencyError:
with _rdkit_stream_to_file(file_path) as writer:
yield writer

Expand Down Expand Up @@ -187,7 +187,7 @@ def capture_toolkit_warnings(): # pragma: no cover
try:
with _oe_capture_warnings():
yield
except MissingOptionalDependency:
except MissingOptionalDependencyError:
yield

logging.getLogger("openff.toolkit").setLevel(openff_logger_level)
Expand Down Expand Up @@ -220,7 +220,7 @@ def smiles_to_inchi_key(smiles: str) -> str:

try: # pragma: no cover
return _oe_smiles_to_inchi_key(smiles)
except MissingOptionalDependency:
except MissingOptionalDependencyError:
return _rdkit_smiles_to_inchi_key(smiles)


Expand Down

0 comments on commit 3b56fcc

Please sign in to comment.