diff options
Diffstat (limited to 'cloudinit/DataSourceEc2.py')
-rw-r--r-- | cloudinit/DataSourceEc2.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/cloudinit/DataSourceEc2.py b/cloudinit/DataSourceEc2.py index aee10ffa..9191e647 100644 --- a/cloudinit/DataSourceEc2.py +++ b/cloudinit/DataSourceEc2.py @@ -18,16 +18,13 @@ import DataSource -from cloudinit import seeddir, log +from cloudinit import seeddir, log # pylint: disable=W0611 import cloudinit.util as util import socket import urllib2 import time -import sys import boto.utils as boto_utils import os.path -import errno -import urlparse class DataSourceEc2(DataSource.DataSource): api_ver = '2009-04-04' @@ -92,7 +89,7 @@ class DataSourceEc2(DataSource.DataSource): max_wait = 120 try: max_wait = int(mcfg.get("max_wait",max_wait)) - except Exception as e: + except Exception: util.logexc(log) log.warn("Failed to get max wait. using %s" % max_wait) @@ -102,7 +99,7 @@ class DataSourceEc2(DataSource.DataSource): timeout = 50 try: timeout = int(mcfg.get("timeout",timeout)) - except Exception as e: + except Exception: util.logexc(log) log.warn("Failed to get timeout, using %s" % timeout) @@ -229,7 +226,6 @@ def wait_for_metadata_service(urls, max_wait=None, timeout=None, status_cb=None) starttime = time.time() sleeptime = 1 - timeout_orig = timeout if status_cb == None: def status_cb(msg): return |