Skip to content
Snippets Groups Projects
Commit 67a08ff4 authored by Marco Biasini's avatar Marco Biasini
Browse files

fix BZDNG-449

parent a2d9ddfc
Branches
Tags
No related merge requests found
......@@ -300,11 +300,9 @@ def LoadMMCIF(filename, restrict_chains="", fault_tolerant=None, calpha_only=Non
prof.fault_tolerant=_override(prof.fault_tolerant, fault_tolerant)
if remote:
output_dir = tempfile.gettempdir()
if __GetModelFromPDB(filename, output_dir):
filename = os.path.join(output_dir, 'pdb%s.ent.gz' % filename)
else:
raise IOError('Can not load PDB %s from www.pdb.org'%filename)
from ost.io.remote import RemoteGet
tmp_file =RemoteGet(filename, from_repo='cif')
filename = tmp_file.name
conop_inst = conop.Conopology.Instance()
builder = conop_inst.GetBuilder("DEFAULT")
......
......@@ -50,7 +50,10 @@ class RemoteRepository:
try:
connection = urllib2.urlopen(remote_url)
status = connection.getcode()
if hasattr(connection, 'code'):
status = connection.code
else:
status = connection.getcode()
except urllib2.HTTPError, e:
status = e.code
msg = 'Could not load %s from %s (status code %d)'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment