Skip to content

Commit 8d37fbc

Browse files
raise error instead of sys.exit (#569)
`sys.exit` is a lousy implementation when one wants to catch the error. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 1dadd7e commit 8d37fbc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

dpdata/qe/scf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env python3
22

33
import os
4-
import sys
54

65
import numpy as np
76

@@ -55,7 +54,7 @@ def get_cell(lines):
5554
raise RuntimeError("parameter 'a' or 'celldm(1)' cannot be found.")
5655
ret = np.array([[a, 0.0, 0.0], [0.0, a, 0.0], [0.0, 0.0, a]])
5756
else:
58-
sys.exit("ibrav > 1 not supported yet.")
57+
raise RuntimeError("ibrav > 1 not supported yet.")
5958
return ret
6059

6160

0 commit comments

Comments
 (0)