| 28 | FORTUNE_PATH = "/usr/games/fortune" |
| 29 | |
| 30 | class CookieServer_i (Fortune__POA.CookieServer): |
| 31 | def get_cookie(self): |
| 32 | pipe = os.popen(FORTUNE_PATH) |
| 33 | cookie = pipe.read() |
| 34 | if pipe.close(): |
| 35 | # An error occurred with the pipe |
| 36 | cookie = "Oh dear, couldn't get a fortune\n" |
| 37 | return cookie |
| 38 | |
| 39 | orb = CORBA.ORB_init(sys.argv) |
| 40 | poa = orb.resolve_initial_references("RootPOA") |