<s> from twisted . spread import pb <EOL> from twisted . internet import reactor <EOL> class MyError ( pb . Error ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> class MyError2 ( Exception ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> class One ( pb . Root ) : <EOL> def remote_broken ( self ) : <EOL> msg = "<STR_LIT>" <EOL> print "<STR_LIT>" % msg <EOL> raise MyError ( msg ) <EOL> def remote_broken2 ( self ) : <EOL> msg = "<STR_LIT>" <EOL> print "<STR_LIT>" % msg <EOL> raise MyError2 ( msg ) <EOL> def main ( ) : <EOL> reactor . listenTCP ( <NUM_LIT> , pb . PBServerFactory ( One ( ) ) ) <EOL> reactor . run ( ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) </s>
