Created
March 18, 2014 08:52
-
-
Save clayg/9616127 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/swift/container/server.py b/swift/container/server.py | |
index eb72513..8069d20 100644 | |
--- a/swift/container/server.py | |
+++ b/swift/container/server.py | |
@@ -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) | |
try: | |
- 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: | |
pass | |
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