From d7da90ebc8aeee180ba470c002f7e37ef7df1089 Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Tue, 2 Jan 2007 02:42:34 +0000 Subject: Ported from 2.1 branch: Ensure that exported XML is written in utf-8, at least if we're writing to a file other than stdout. Fix a typo in getting the digest style. Update copyright years. In HTTPRunner.py, catch KeyboardInterrupt. In Python 2.5 this has been moved in the exception hierarchy so that it's no longer caught by "except Exception". import.py: Import user topic selections. Fix a typo in an error message. Catch BadDomainSpecificationErrors that can be raised in MailList.Create(). --- Mailman/Queue/HTTPRunner.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Mailman/Queue') diff --git a/Mailman/Queue/HTTPRunner.py b/Mailman/Queue/HTTPRunner.py index e2c053629..32620f458 100644 --- a/Mailman/Queue/HTTPRunner.py +++ b/Mailman/Queue/HTTPRunner.py @@ -1,4 +1,4 @@ -# Copyright (C) 2006 by the Free Software Foundation, Inc. +# Copyright (C) 2006-2007 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -63,6 +63,8 @@ server = make_server(config.HTTP_HOST, config.HTTP_PORT, qlog.info('HTTPRunner qrunner started.') try: server.serve_forever() -except: +# Do it this way because of exception hierarchy changes in Python 2.5. XXX +# Change this to BaseException for Python 2.5. +except (Exception, KeyboardInterrupt): qlog.exception('HTTPRunner qrunner exiting.') raise -- cgit v1.3.1