#NEWLINE# def add_group_email_grant( self , permission , email_address , recursive = False , headers = None ) : #NEWLINE# #INDENT# "\n        Convenience method that provides a quick way to add an email group\n        grant to a bucket. This method retrieves the current ACL, creates a new\n        grant based on the parameters passed in, adds that grant to the ACL and\n        then PUT's the new ACL back to GS.\n\n        :type permission: string\n        :param permission: The permission being granted. Should be one of:\n            READ|WRITE|FULL_CONTROL\n            See http://code.google.com/apis/storage/docs/developer-guide.html#authorization\n            for more details on permissions.\n\n        :type email_address: string\n        :param email_address: The email address associated with the Google\n            Group to which you are granting the permission.\n\n        :type recursive: bool\n        :param recursive: A boolean value to controls whether the call\n                          will apply the grant to all keys within the bucket\n                          or not.  The default value is False.  By passing a\n                          True value, the call will iterate through all keys\n                          in the bucket and apply the same grant to each key.\n                          CAUTION: If you have a lot of keys, this could take\n                          a long time!\n        " #NEWLINE# if ( permission not in GSPermissions ) : #NEWLINE# #INDENT# raise self . connection . provider . storage_permissions_error ( ( 'Unknown Permission: %s' % permission ) ) #NEWLINE# #UNINDENT# acl = self . get_acl ( headers = headers ) #NEWLINE# acl . add_group_email_grant ( permission , email_address ) #NEWLINE# self . set_acl ( acl , headers = headers ) #NEWLINE# if recursive : #NEWLINE# #INDENT# for key in self : #NEWLINE# #INDENT# key . add_group_email_grant ( permission , email_address , headers = email_address )