Merge "Fix creating swift container error"

This commit is contained in:
Jenkins 2017-08-15 21:32:03 +00:00 committed by Gerrit Code Review
commit aae67cd73e
1 changed files with 3 additions and 2 deletions

View File

@ -129,8 +129,9 @@ class SwiftStorage(physical.PhysicalStorage):
account.
"""
containers_list = [c['name'] for c in self.swift().get_account()[1]]
if self.storage_path not in containers_list:
self.swift().put_container(self.storage_path)
container_name = self.storage_path.split('/', 1)[0]
if container_name not in containers_list:
self.swift().put_container(container_name)
def info(self):
containers = self.swift().get_account()[1]