Avoid NameError if requests is not installed. Do not correct isssue#1047

pull/1073/head
nicolargo 2017-03-10 20:14:31 +01:00
parent 53d7f1274d
commit ce51f3e8d1
1 changed files with 0 additions and 3 deletions

View File

@ -154,9 +154,6 @@ class ThreadAwsEc2Grabber(threading.Thread):
try:
# Local request, a timeout of 3 seconds is OK
r = requests.get(r_url, timeout=3)
except requests.exceptions.ConnectTimeout:
logger.debug('cloud plugin - Connection to {} timed out'.format(r_url))
break
except Exception as e:
logger.debug('cloud plugin - Cannot connect to the AWS EC2 API {}: {}'.format(r_url, e))
break