Mercurial > bitten > bitten-test
diff bitten/slave.py @ 18:591a5a836ecc
* {{{beep.Listener}}} now has an event loop (based on code mostly from medusa)
* The Bitten master now opens a Trac environment and checks for changes to the repository every 15 seconds.
* {{{beep.Profile}}} renamed to {{{beep.ProfileHandler}}}
author | cmlenz |
---|---|
date | Fri, 17 Jun 2005 09:09:07 +0000 |
parents | 06207499c58c |
children | 9db5f8eddb0d |
line wrap: on
line diff
--- a/bitten/slave.py +++ b/bitten/slave.py @@ -18,7 +18,6 @@ # # Author: Christopher Lenz <cmlenz@gmx.de> -import asyncore import getopt import logging import os @@ -46,7 +45,7 @@ handle_ok=self.channel_started) -class BittenProfileHandler(beep.Profile): +class BittenProfileHandler(beep.ProfileHandler): """Handles communication on the Bitten profile from the client perspective. """ URI = 'http://bitten.cmlenz.net/beep-profile/' @@ -90,7 +89,11 @@ host = args[0] if len(args) > 1: - port = int(args[1]) + try: + port = int(args[1]) + except ValueError: + print>>sys.stderr, 'Port must be an integer' + sys.exit(2) else: port = 7633