From 672e7208eef2506e3cee82cfebd83d71e734f3e4 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Fri, 13 Apr 2018 09:31:18 -0700 Subject: Give a better message from scripts/driver on SyntaxError in mm_cfg.py. --- NEWS | 4 ++++ scripts/driver | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index e2f64e12..b151e779 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,10 @@ Here is a history of user visible changes to Mailman. Bug fixes and other patches + - The message displayed in the browser when accessing a Mailman CGI when + mm_cfg.py can't be imported due to some exception other than ImportError + has been improved. (LP: #1760506) + - The reimplementation of DELIVERY_RETRY_WAIT in 2.1.26 could cause extra dequeueing and requeueing in the out queue by OutgoingRunner. This is fixed. (LP: #1762871) diff --git a/scripts/driver b/scripts/driver index 67ff0fdf..3c8f831b 100644 --- a/scripts/driver +++ b/scripts/driver @@ -1,6 +1,6 @@ # -*- python -*- -# Copyright (C) 1998-2013 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2018 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 @@ -143,7 +143,8 @@ def print_traceback(logfp=None): traceback = None try: from Mailman.mm_cfg import VERSION - except ImportError: + except: + # There could be any exception if mm_cfg.py is not valid python. VERSION = '<undetermined>' # Write to the log file first. @@ -182,7 +183,7 @@ a description of what happened. Thanks! print '''

Please inform the webmaster for this site of this problem. Printing of traceback and other system information has been explicitly inhibited, but the webmaster can find this information in the -Mailman error logs.''' +Mailman error logs or the web server logs.''' -- cgit v1.2.3 From 143e38ced0dcdfa8a402e803c441c545a61a142e Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Thu, 3 May 2018 14:23:47 -0700 Subject: bin/arch now uses i18n.C_ for progress messages. --- Mailman/Archiver/HyperArch.py | 9 +++++---- Mailman/Archiver/pipermail.py | 14 +++++++------- NEWS | 4 ++++ 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/Mailman/Archiver/HyperArch.py b/Mailman/Archiver/HyperArch.py index 0c0e3356..1b0cdce5 100644 --- a/Mailman/Archiver/HyperArch.py +++ b/Mailman/Archiver/HyperArch.py @@ -56,6 +56,7 @@ from Mailman.Mailbox import ArchiverMailbox # Set up i18n. Assume the current language has already been set in the caller. _ = i18n._ +C_ = i18n.C_ gzip = None if mm_cfg.GZIP_ARCHIVE_TXT_FILES: @@ -912,7 +913,7 @@ class HyperArchive(pipermail.T): A string can be returned if the list only contains one entry, and the empty list is legal.""" res = self.dateToVolName(float(article.date)) - self.message(_("figuring article archives\n")) + self.message(C_("figuring article archives\n")) self.message(res + "\n") return res @@ -1050,7 +1051,7 @@ class HyperArchive(pipermail.T): self.depth=0 print self.html_head() if not self.THREADLAZY and self.type=='Thread': - self.message(_("Computing threaded index\n")) + self.message(C_("Computing threaded index\n")) self.updateThreadedIndex() def write_index_footer(self): @@ -1315,14 +1316,14 @@ class HyperArchive(pipermail.T): def update_article(self, arcdir, article, prev, next): seq = article.sequence filename = os.path.join(arcdir, article.filename) - self.message(_('Updating HTML for article %(seq)s')) + self.message(C_('Updating HTML for article %(seq)s')) try: f = open(filename) article.loadbody_fromHTML(f) f.close() except IOError, e: if e.errno <> errno.ENOENT: raise - self.message(_('article file %(filename)s is missing!')) + self.message(C_('article file %(filename)s is missing!')) article.prev = prev article.next = next omask = os.umask(002) diff --git a/Mailman/Archiver/pipermail.py b/Mailman/Archiver/pipermail.py index 9b0813b0..62fb92e8 100644 --- a/Mailman/Archiver/pipermail.py +++ b/Mailman/Archiver/pipermail.py @@ -20,7 +20,7 @@ from Mailman import mm_cfg from Mailman import Errors from Mailman.Mailbox import ArchiverMailbox from Mailman.Logging.Syslog import syslog -from Mailman.i18n import _ +from Mailman.i18n import _, C_ # True/False try: @@ -295,7 +295,7 @@ class T: if errno != 2: raise os.error, errdata else: - self.message(_('Creating archive directory ') + self.basedir) + self.message(C_('Creating archive directory ') + self.basedir) omask = os.umask(0) try: os.mkdir(self.basedir, self.DIRMODE) @@ -307,7 +307,7 @@ class T: if not reload: raise IOError f = open(os.path.join(self.basedir, 'pipermail.pck'), 'r') - self.message(_('Reloading pickled archive state')) + self.message(C_('Reloading pickled archive state')) d = pickle.load(f) f.close() for key, value in d.items(): @@ -334,7 +334,7 @@ class T: self.update_TOC = 0 self.write_TOC() # Save the collective state - self.message(_('Pickling archive state into ') + self.message(C_('Pickling archive state into ') + os.path.join(self.basedir, 'pipermail.pck')) self.database.close() del self.database @@ -446,7 +446,7 @@ class T: # dirtied or not. def update_archive(self, archive): self.archive = archive - self.message(_("Updating index files for archive [%(archive)s]")) + self.message(C_("Updating index files for archive [%(archive)s]")) arcdir = os.path.join(self.basedir, archive) self.__set_parameters(archive) @@ -479,7 +479,7 @@ class T: self._restore_stdout() def _update_thread_index(self, archive, arcdir): - self.message(_(" Thread")) + self.message(C_(" Thread")) self._open_index_file_as_stdout(arcdir, "thread") self.type = 'Thread' self.write_index_header() @@ -590,7 +590,7 @@ class T: # It was an unparseable message continue msgid = m.get('message-id', 'n/a') - self.message(_('#%(counter)05d %(msgid)s')) + self.message(C_('#%(counter)05d %(msgid)s')) a = self._makeArticle(m, self.sequence) self.sequence += 1 self.add_article(a) diff --git a/NEWS b/NEWS index b151e779..71e22ee0 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,10 @@ Here is a history of user visible changes to Mailman. Bug fixes and other patches + - Some messages from bin/arch were not issued in the charset of the system + locale when DISABLE_COMMAND_LOCALE_CSET is No. Thanks to Yasuhito + FUTATSUKI this is now fixed. (LP: #1768892) + - The message displayed in the browser when accessing a Mailman CGI when mm_cfg.py can't be imported due to some exception other than ImportError has been improved. (LP: #1760506) -- cgit v1.2.3 From 86c1771a9cc63404ed1e258bbed6920021140eae Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Sat, 5 May 2018 09:25:09 -0700 Subject: Add

diff --git a/NEWS b/NEWS index 71e22ee0..3f0238f4 100644 --- a/NEWS +++ b/NEWS @@ -39,6 +39,10 @@ Here is a history of user visible changes to Mailman. - A Python 2.7 dependency introduced with the reCAPTCHA feature in 2.1.26 has been removed. (LP: #1752658) + - The reCAPTCHA feature requires JavaScript. If JavaScript is not enabled, + a message will be displayed on the subscribe form that JavaScript is + required. (LP: #1769374) + 2.1.26 (04-Feb-2018) Security -- cgit v1.2.3