Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Fix bug in add_user_grant. Fixes issue 450.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitch Garnaat committed Sep 14, 2010
1 parent f003f37 commit c9d1be2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions boto/s3/key.py
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ def add_email_grant(self, permission, email_address, headers=None):
policy.acl.add_email_grant(permission, email_address)
self.set_acl(policy, headers=headers)

def add_user_grant(self, permission, user_id):
def add_user_grant(self, permission, user_id, headers=None):
"""
Convenience method that provides a quick way to add a canonical user grant to a key.
This method retrieves the current ACL, creates a new grant based on the parameters
Expand All @@ -939,4 +939,4 @@ def add_user_grant(self, permission, user_id):
"""
policy = self.get_acl()
policy.acl.add_user_grant(permission, user_id)
self.set_acl(policy)
self.set_acl(policy, headers=headers)

0 comments on commit c9d1be2

Please sign in to comment.