Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if error is an HTTPError before accesing the code attribute #54

Merged
merged 2 commits into from
Feb 24, 2016

Conversation

gilles-duboscq
Copy link
Member

Should fix #53 (see HTTPError)

@@ -3972,7 +3972,7 @@ def getSnapshot(self, groupId, artifactId, version):
try:
metadataFile = urllib2.urlopen(metadataUrl)
except urllib2.URLError as e:
if e.code == 404:
if isinstance(e, urllib2.HTTPError) and e.code == 404:
return None
abort('Error while retreiving snappshot for {}:{}:{}: {}'.format(groupId, artifactId, version, str(e)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while you're at it, you could fix the typos here, too: s/retreiving/retrieving/ s/snappshot/snapshot/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

gilles-duboscq added a commit that referenced this pull request Feb 24, 2016
Check if error is an HTTPError before accesing the code attribute
@gilles-duboscq gilles-duboscq merged commit 6805b55 into graalvm:master Feb 24, 2016
dougxc added a commit that referenced this pull request Apr 29, 2016
…aster

* commit '2a3b71340b4f36c49b08f499bb97d694d5282291':
  only create stub jar for JVMCI module if JVMCI is not available as a suite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

accessing non-existent attribute from URLError object
4 participants