Skip to content
Snippets Groups Projects
Commit 08c162fc authored by Vermaat's avatar Vermaat
Browse files

Also check for httplib.HTTPException in Entrez API call

git-svn-id: https://humgenprojects.lumc.nl/svn/mutalyzer/trunk@461 eb6bd6ab-9ccd-42b9-aceb-e2899b4a52f1
parent 8d4fdfe5
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,7 @@ from Bio.Seq import UnknownSeq
from Bio.Alphabet import ProteinAlphabet
from xml.dom import DOMException, minidom
from xml.parsers import expat
from httplib import HTTPException
from mutalyzer import util
from mutalyzer import config
......@@ -261,13 +262,13 @@ class Retriever(object) :
response = Entrez.efetch(db='SNP', id=id, rettype='flt',
retmode='xml')
break
except IOError:
except (IOError, HTTPException):
time.sleep(ENTREZ_SLEEP)
else:
try:
response = Entrez.efetch(db='SNP', id=id, rettype='flt',
retmode='xml')
except IOError as e:
except (IOError, HTTPException) as e:
# Could not parse XML.
self._output.addMessage(__file__, 4, 'EENTREZ',
'Error connecting to dbSNP.')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment