<s> from struct import pack <EOL> from vertica_python . vertica . messages . message import FrontendMessage <EOL> class Close ( FrontendMessage ) : <EOL> def __init__ ( self , close_type , close_name ) : <EOL> self . close_name = close_name <EOL> if close_type == '<STR_LIT>' : <EOL> self . close_type = '<STR_LIT:P>' <EOL> elif close_type == '<STR_LIT>' : <EOL> self . close_type = '<STR_LIT:S>' <EOL> else : <EOL> raise ValueError ( "<STR_LIT>" . format ( close_type ) ) <EOL> def to_bytes ( self ) : <EOL> return self . message_string ( pack ( '<STR_LIT>' . format ( len ( self . close_name ) ) , self . close_type , self . close_name ) ) <EOL> Close . _message_id ( b'<STR_LIT:C>' ) </s>
