Commit d69992b4 authored by Florent Guillaume's avatar Florent Guillaume

Fixed untrapped SystemError in codec lookup if someone had a form

parameter like "description:test" where test is a codec that's
apparently registered but not found.

(description:test was actually a typo in CMF's topic_editTopic.py)
parent 434cbb8a
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# #
############################################################################## ##############################################################################
__version__='$Revision: 1.67 $'[11:-2] __version__='$Revision: 1.68 $'[11:-2]
import re, sys, os, urllib, time, random, cgi, codecs import re, sys, os, urllib, time, random, cgi, codecs
from BaseRequest import BaseRequest from BaseRequest import BaseRequest
...@@ -982,7 +982,7 @@ class HTTPRequest(BaseRequest): ...@@ -982,7 +982,7 @@ class HTTPRequest(BaseRequest):
def has_codec(x): def has_codec(x):
try: try:
codecs.lookup(x) codecs.lookup(x)
except LookupError: except (LookupError, SystemError):
return 0 return 0
else: else:
return 1 return 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment