From ce51f3e8d1a7c783630e11bedaae230f451ee16c Mon Sep 17 00:00:00 2001 From: nicolargo Date: Fri, 10 Mar 2017 20:14:31 +0100 Subject: [PATCH] Avoid NameError if requests is not installed. Do not correct isssue#1047 --- glances/plugins/glances_cloud.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/glances/plugins/glances_cloud.py b/glances/plugins/glances_cloud.py index c1d6fba3..591ef81a 100644 --- a/glances/plugins/glances_cloud.py +++ b/glances/plugins/glances_cloud.py @@ -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