#NEWLINE# def encode( self ) : #NEWLINE# #INDENT# pieces = list ( ) #NEWLINE# assert isinstance ( self . queue , str_or_bytes ) , 'A non-string value was supplied for self.queue' #NEWLINE# data . encode_short_string ( pieces , self . queue ) #NEWLINE# pieces . append ( struct . pack ( '>I' , self . message_count ) ) #NEWLINE# pieces . append ( struct . pack ( '>I' , self . consumer_count ) ) #NEWLINE# return pieces