#NEWLINE# def get_object_by_name( self , object_name , download = False ) : #NEWLINE# #INDENT# 'Get an object stored by its name.\n\n        Does not download the content of the object by default.\n        :param object_name: Name of the object to create\n        :param download: If True download also the object content\n        ' #NEWLINE# if download : #NEWLINE# #INDENT# call = 'get_object' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# call = 'head_object' #NEWLINE# #UNINDENT# res = self . _manager . _swift_call ( self . region . name , call , self . name , object_name ) #NEWLINE# try : #NEWLINE# #INDENT# return self . _en_dict_to_obj ( object_name , res [ 0 ] , data = res [ 1 ] ) #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# return self . _en_dict_to_obj ( object_name , object_name )