summaryrefslogtreecommitdiff
path: root/cloudinit/url_helper.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-06-20 17:13:55 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-06-20 17:13:55 -0700
commitec4bdc4fb8d8d3a8f8b4f498eb47eac740485ede (patch)
tree306886dd731180f1c51583679a7bb33c7c7f10d8 /cloudinit/url_helper.py
parent5c5525b35970611a5c4dbd44c5c6b6e2d57556cb (diff)
downloadvyos-cloud-init-ec4bdc4fb8d8d3a8f8b4f498eb47eac740485ede.tar.gz
vyos-cloud-init-ec4bdc4fb8d8d3a8f8b4f498eb47eac740485ede.zip
Massive pylint + pep8 fixups!
Diffstat (limited to 'cloudinit/url_helper.py')
-rw-r--r--cloudinit/url_helper.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/cloudinit/url_helper.py b/cloudinit/url_helper.py
index 1c583eba..223278ce 100644
--- a/cloudinit/url_helper.py
+++ b/cloudinit/url_helper.py
@@ -47,11 +47,11 @@ class UrlResponse(object):
@property
def contents(self):
return self._contents
-
+
@property
def headers(self):
return self._headers
-
+
def __str__(self):
if not self.contents:
return ''
@@ -66,7 +66,7 @@ class UrlResponse(object):
return True
else:
return False
-
+
def readurl(url, data=None, timeout=None,
retries=0, sec_between=1, headers=None):
@@ -89,8 +89,8 @@ def readurl(url, data=None, timeout=None,
excepts = []
LOG.info(("Attempting to open '%s' with %s attempts"
- " (%s retries, timeout=%s) to be performed"),
- url, attempts, retries, timeout)
+ " (%s retries, timeout=%s) to be performed"),
+ url, attempts, retries, timeout)
open_args = {}
if timeout is not None:
open_args['timeout'] = int(timeout)
@@ -112,7 +112,7 @@ def readurl(url, data=None, timeout=None,
excepts.append(e)
except urllib2.URLError as e:
# This can be a message string or
- # another exception instance
+ # another exception instance
# (socket.error for remote URLs, OSError for local URLs).
if (isinstance(e.reason, (OSError)) and
e.reason.errno == errno.ENOENT):
@@ -128,7 +128,7 @@ def readurl(url, data=None, timeout=None,
# Didn't work out
LOG.warn("Failed reading from %s after %s attempts", url, attempts)
-
+
# It must of errored at least once for code
# to get here so re-raise the last error
LOG.debug("%s errors occured, re-raising the last one", len(excepts))