summaryrefslogtreecommitdiff
path: root/glance_store/_drivers/swift
diff options
context:
space:
mode:
authorRadoslaw Smigielski <radoslaw.smigielski@alcatel-lucent.com>2015-01-23 15:40:41 +0000
committerJordanP <jordan.pittier@scality.com>2015-02-06 15:39:45 +0100
commit36e293b5d5322c15cb612356616357e2df2c6f52 (patch)
treeed9f29daf7239f7a80769bcd725e1b159a8846ff /glance_store/_drivers/swift
parentbd04fbeed5b0809ff8f2c24b690f1e81ce1393a1 (diff)
downloadglance_store-36e293b5d5322c15cb612356616357e2df2c6f52.tar.gz
Fixing PEP8 E712 and E265
1. PEP8 E712, removed singleton comparison using '==' operator: E712 comparison to True should be 'if cond is True:'or 'if cond:' Two places. 2. Fix PEP8 E265 block comment syntax. E265 block comment should start with '# ' 3. No more E712 so removed it from tox.ini ignored list. Change-Id: I778aa5c4e1458cccb7a34d087b3b59eceadd45d0
Diffstat (limited to 'glance_store/_drivers/swift')
-rw-r--r--glance_store/_drivers/swift/store.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/glance_store/_drivers/swift/store.py b/glance_store/_drivers/swift/store.py
index 56196eb..e49c61e 100644
--- a/glance_store/_drivers/swift/store.py
+++ b/glance_store/_drivers/swift/store.py
@@ -208,13 +208,13 @@ class StoreLocation(location.StoreLocation):
obj = self.obj.strip('/')
if not credentials_included:
- #Used only in case of an add
- #Get the current store from config
+ # Used only in case of an add
+ # Get the current store from config
store = self.conf.glance_store.default_swift_reference
return '%s://%s/%s/%s' % ('swift+config', store, container, obj)
if self.scheme == 'swift+config':
- if self.ssl_enabled == True:
+ if self.ssl_enabled:
self.scheme = 'swift+https'
else:
self.scheme = 'swift+http'
@@ -346,7 +346,7 @@ class StoreLocation(location.StoreLocation):
return self.auth_or_store_url
else:
if self.scheme == 'swift+config':
- if self.ssl_enabled == True:
+ if self.ssl_enabled:
self.scheme = 'swift+https'
else:
self.scheme = 'swift+http'