Skip to content
Snippets Groups Projects
Commit 7189eb30 authored by Bienchen's avatar Bienchen
Browse files

Added filename to exception if LoadPDB does not find an entity.

parent 1e619ea7
No related branches found
No related tags found
No related merge requests found
......@@ -175,7 +175,7 @@ def LoadPDB(filename, restrict_chains="", no_hetatms=None,
conop_inst.ConnectAll(builder, ent, 0)
ent_list.append(ent)
if len(ent_list)==0:
raise IOError("File doesn't contain any entities")
raise IOError("File '%s' doesn't contain any entities" % filename)
return ent_list
else:
ent=mol.CreateEntity()
......@@ -183,7 +183,7 @@ def LoadPDB(filename, restrict_chains="", no_hetatms=None,
reader.Import(ent, restrict_chains)
conop_inst.ConnectAll(builder, ent, 0)
else:
raise IOError("File doesn't contain any entities")
raise IOError("File '%s' doesn't contain any entities" % filename)
if seqres:
return ent, reader.seqres
return ent
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment