#NEWLINE# def _encode_container_name( self , name ) : #NEWLINE# #INDENT# '\n        Encode container name so it can be used as part of the HTTP request.\n        ' #NEWLINE# if name . startswith ( '/' ) : #NEWLINE# #INDENT# name = name [ 1 : ] #NEWLINE# #UNINDENT# name = urlquote ( name ) #NEWLINE# if ( name . find ( '/' ) != ( - 1 ) ) : #NEWLINE# #INDENT# raise InvalidContainerNameError ( value = 'Container name cannot contain slashes' , container_name = name , driver = self ) #NEWLINE# #UNINDENT# if ( len ( name ) > 256 ) : #NEWLINE# #INDENT# raise InvalidContainerNameError ( value = 'Container name cannot be longer than 256 bytes' , container_name = name , driver = self ) #NEWLINE# #UNINDENT# return self