diff options
author | jmelo <jmelo@FreeBSD.org> | 2006-11-06 20:36:43 +0800 |
---|---|---|
committer | jmelo <jmelo@FreeBSD.org> | 2006-11-06 20:36:43 +0800 |
commit | 2dd22bf0c69525359a56d2f58fc5c736f597f445 (patch) | |
tree | 0c58ebae0e299903772800e5cd92c15968c86d12 /mail/mailman/files | |
parent | 745e825168c4eab3ace99ae364606248df4f0938 (diff) | |
download | freebsd-ports-gnome-2dd22bf0c69525359a56d2f58fc5c736f597f445.tar.gz freebsd-ports-gnome-2dd22bf0c69525359a56d2f58fc5c736f597f445.tar.zst freebsd-ports-gnome-2dd22bf0c69525359a56d2f58fc5c736f597f445.zip |
- Fix codec error on python 2.5.
PR: ports/104429
Submitted by: NIIMI Satoshi <sa2c@sa2c.net>
Diffstat (limited to 'mail/mailman/files')
-rw-r--r-- | mail/mailman/files/patch-misc::paths.py.in | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/mail/mailman/files/patch-misc::paths.py.in b/mail/mailman/files/patch-misc::paths.py.in new file mode 100644 index 000000000000..f7db8a1d5d8c --- /dev/null +++ b/mail/mailman/files/patch-misc::paths.py.in @@ -0,0 +1,41 @@ +Index: misc/paths.py.in +--- branches/Release_2_1-maint/mailman/misc/paths.py.in 2005/12/30 18:50:08 7694 ++++ branches/Release_2_1-maint/mailman/misc/paths.py.in 2006/10/12 00:48:48 8056 +@@ -35,6 +35,19 @@ + if exec_prefix == '${prefix}': + exec_prefix = prefix + ++# Check if ja/ko codecs are available before changing path. ++try: ++ s = unicode('OK', 'iso-2022-jp') ++ jaok = True ++except LookupError: ++ jaok = False ++ ++try: ++ s = unicode('OK', 'euc-kr') ++ kook = True ++except LookupError: ++ kook = False ++ + # Hack the path to include the parent directory of the $prefix/Mailman package + # directory. + sys.path.insert(0, prefix) +@@ -53,12 +66,14 @@ + # In a normal interactive Python environment, the japanese.pth and korean.pth + # files would be imported automatically. But because we inhibit the importing + # of the site module, we need to be explicit about importing these codecs. +-import japanese ++if not jaok: ++ import japanese + # As of KoreanCodecs 2.0.5, you had to do the second import to get the Korean + # codecs installed, however leave the first import in there in case an upgrade + # changes this. +-import korean +-import korean.aliases ++if not kook: ++ import korean ++ import korean.aliases + # Arabic and Hebrew (RFC-1556) encoding aliases. (temporary solution) + import encodings.aliases + encodings.aliases.aliases.update({ |