summaryrefslogtreecommitdiff
path: root/cloudinit/url_helper.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/url_helper.py')
-rw-r--r--cloudinit/url_helper.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/url_helper.py b/cloudinit/url_helper.py
index 0a5be0b3..4e814a5f 100644
--- a/cloudinit/url_helper.py
+++ b/cloudinit/url_helper.py
@@ -47,7 +47,7 @@ try:
_REQ_VER = LooseVersion(_REQ.version) # pylint: disable=no-member
if _REQ_VER >= LooseVersion('0.8.8'):
SSL_ENABLED = True
- if _REQ_VER >= LooseVersion('0.7.0') and _REQ_VER < LooseVersion('1.0.0'):
+ if LooseVersion('0.7.0') <= _REQ_VER < LooseVersion('1.0.0'):
CONFIG_ENABLED = True
except ImportError:
pass
@@ -121,7 +121,7 @@ class UrlResponse(object):
upper = 300
if redirects_ok:
upper = 400
- if self.code >= 200 and self.code < upper:
+ if 200 <= self.code < upper:
return True
else:
return False