Skip to content

Commit

Permalink
Improve ImportError traceback for _aligners (#1736)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-rands authored and peterjc committed Jul 17, 2018
1 parent 5dc1f48 commit 8efbf6d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Bio/Align/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@
from Bio.SeqRecord import SeqRecord, _RestrictedDict
from Bio import Alphabet

from Bio.Align import _aligners
try:
from Bio.Align import _aligners
except ImportError as e:
new_exc = ImportError("{}: you should not import directly from the "
"biopython source directory; please exit the source "
"tree and re-launch your code from there".format(e))
new_exc.__cause__ = None
raise new_exc


class MultipleSeqAlignment(object):
Expand Down

0 comments on commit 8efbf6d

Please sign in to comment.