提交 ce51f3e8 编写于 作者: N nicolargo

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

上级 53d7f127
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册