Skip to content

Instantly share code, notes, and snippets.

Created March 18, 2014 08:52
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
diff --git a/swift/container/ b/swift/container/
index eb72513..8069d20 100644
--- a/swift/container/
+++ b/swift/container/
@@ -229,9 +229,13 @@ class ContainerController(object):
broker = self._get_container_broker(drive, part, account, container)
if account.startswith(self.auto_create_account_prefix) and obj and \
not os.path.exists(broker.db_file):
+ requested_policy_index = (self.get_and_validate_policy_index(req)
+ or self.policies.default.idx)
- broker.initialize(normalize_timestamp(
- req.headers.get('x-timestamp') or time.time()), -1)
+ broker.initialize(
+ normalize_timestamp(
+ req.headers.get('x-timestamp') or time.time()),
+ requested_policy_index)
except DatabaseAlreadyExists:
if not os.path.exists(broker.db_file):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment