<s> import pyrs . msgs <EOL> from pyrs . proto import core_pb2 <EOL> class RsPrintResponder ( object ) : <EOL> def handlemsg ( self , req_id , msg_id , msg_body , rpc , parser ) : <EOL> print "<STR_LIT>" % ( req_id , msg_id ) <EOL> resp = parser . construct ( msg_id , msg_body ) ; <EOL> if not resp : <EOL> print "<STR_LIT>" <EOL> return True ; <EOL> print "<STR_LIT>" ; <EOL> print resp ; <EOL> return True ; <EOL> class RsCheckStatusResponder ( object ) : <EOL> def handlemsg ( self , req_id , msg_id , msg_body , rpc , parser ) : <EOL> print "<STR_LIT>" % ( req_id , msg_id ) <EOL> resp = parser . construct ( msg_id , msg_body ) ; <EOL> if not resp : <EOL> print "<STR_LIT>" <EOL> raise Exception ; <EOL> return False ; <EOL> print "<STR_LIT>" ; <EOL> print resp ; <EOL> if ( resp . status . code == core_pb2 . Status . SUCCESS ) : <EOL> print "<STR_LIT>" ; <EOL> else : <EOL> print "<STR_LIT>" ; <EOL> raise Exception ; <EOL> return True ; </s>
