Skip to content

Commit 2e472df

Browse files
committed
except build docs
1 parent be2722e commit 2e472df

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

torch_scatter/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@
2020
raise RuntimeError(
2121
f'Expected PyTorch version {t_major}.{t_minor} but found '
2222
f'version {major}.{minor}.')
23+
raise OSError(e)
24+
except AttributeError as e:
2325
if os.getenv('BUILD_DOCS', '0') == '1':
2426
pass
2527
else:
26-
raise OSError(e)
28+
raise AttributeError(e)
2729

2830
cuda_version = torch.ops.torch_scatter.cuda_version()
2931
if cuda_version != -1 and torch.version.cuda is not None: # pragma: no cover

torch_scatter/scatter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
try:
1111
torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
1212
'_scatter', [osp.dirname(__file__)]).origin)
13-
except OSError as e:
13+
except AttributeError as e:
1414
if os.getenv('BUILD_DOCS', '0') == '1':
1515
pass
1616
else:
17-
raise OSError(e)
17+
raise AttributeError(e)
1818

1919

2020
@torch.jit.script

torch_scatter/segment_coo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
try:
99
torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
1010
'_segment_coo', [osp.dirname(__file__)]).origin)
11-
except OSError as e:
11+
except AttributeError as e:
1212
if os.getenv('BUILD_DOCS', '0') == '1':
1313
pass
1414
else:
15-
raise OSError(e)
15+
raise AttributeError(e)
1616

1717

1818
@torch.jit.script

torch_scatter/segment_csr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
try:
99
torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
1010
'_segment_csr', [osp.dirname(__file__)]).origin)
11-
except OSError as e:
11+
except AttributeError as e:
1212
if os.getenv('BUILD_DOCS', '0') == '1':
1313
pass
1414
else:
15-
raise OSError(e)
15+
raise AttributeError(e)
1616

1717

1818
@torch.jit.script

0 commit comments

Comments
 (0)