Skip to content

Commit 5133636

Browse files
robertodrbast
authored andcommitted
Move import of local docopt in try block
This gives the more informative error message about `PYTHONPATH` upon import failure.
1 parent 49b1598 commit 5133636

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/go_pcm.py.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ Parses the PCMSolver input file and launches a standalone calculation with the
2929
run_pcm executable.
3030
"""
3131

32-
from pcmsolver.external import docopt
3332
import os
3433
import subprocess
3534
import sys
3635

3736
try:
3837
import pcmsolver as pcm
38+
from pcmsolver.external import docopt
3939
except ImportError as ops:
4040
sys.stderr.write("{}\n\n".format(ops))
4141
sys.stderr.write("""You should update your PYTHONPATH to use go_pcm.py

0 commit comments

Comments
 (0)