#NEWLINE# def insert( self ) : #NEWLINE# #INDENT# new_permission = { #NEWLINE# #INDENT# 'type' : self . param [ 0 ] , #NEWLINE# 'role' : self . param [ 1 ] , #NEWLINE# 'value' : self . param [ 2 ] , #NEWLINE# #UNINDENT# } #NEWLINE# try : #NEWLINE# #INDENT# return self . service . permissions ( ) . insert ( fileId = self . file_id , body = new_permission ) . execute ( ) #NEWLINE# #UNINDENT# except errors . HttpError as error : #NEWLINE# #INDENT# logger . error ( ( 'An error occurred: %s' % error ) ) #NEWLINE# #UNINDENT# return None