on_update_notification: better logging

This commit is contained in:
lilydjwg 2014-10-19 19:39:23 +08:00
parent dd343c911b
commit b4dc45361b

View file

@ -28,8 +28,6 @@ def decode_msg(msg, secret):
return act, int(t)
def main(args, secret):
logging.info('started')
af, socktype, proto, canonname, sockaddr = socket.getaddrinfo(
args.host, args.port, 0, socket.SOCK_DGRAM, 0, 0)[0]
sock = socket.socket(af, socktype, proto)
@ -78,7 +76,8 @@ if __name__ == '__main__':
logging.fatal('REPO_SECRET environment variable not set')
sys.exit(1)
logging.info('started')
try:
main(args, secret)
except KeyboardInterrupt:
print()
logging.info('stopped')