| 1 |
|
#!/usr/bin/python |
| 2 |
|
# |
| 3 |
< |
# Experiments with Pythons XML-RPM implementation |
| 3 |
> |
# Experiments with Pythons XML-RPC implementation |
| 4 |
|
# - the server |
| 5 |
|
# |
| 6 |
|
# $Id$ |
| 11 |
|
|
| 12 |
|
def serve_forever(self): |
| 13 |
|
print '[server] starting up' |
| 14 |
< |
self.quit = 0 |
| 15 |
< |
while not self.quit: |
| 14 |
> |
self.run = True |
| 15 |
> |
while self.run: |
| 16 |
|
self.handle_request() |
| 17 |
|
|
| 18 |
|
print '[server] shutting down' |
| 29 |
|
|
| 30 |
|
def die(self): |
| 31 |
|
"""die() => kills the server""" |
| 32 |
< |
self.server.quit = 1 |
| 32 |
> |
self.server.run = False |
| 33 |
|
return 1 |
| 34 |
|
|
| 35 |
|
def remoteprint(self, text): |