Skip to content
Snippets Groups Projects
Commit e7a8d879 authored by Gavin M. Roy's avatar Gavin M. Roy
Browse files

Catch socket.error

parent 376fb09f
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -10,6 +10,7 @@ import json
import logging
from os import path
import os
import socket
 
from tornado import concurrent, httpclient, ioloop
 
Loading
Loading
@@ -53,7 +54,7 @@ def get_region(profile):
except exceptions.ConfigNotFound:
try:
return _request_region_from_instance()
except (httpclient.HTTPError, OSError) as error:
except (httpclient.HTTPError, OSError, socket.error) as error:
LOGGER.error('Error fetching from EC2 Instance Metadata (%s)',
error)
raise exceptions.ConfigNotFound(path=file_path)
Loading
Loading
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