[KoCo-CVS] [Commit] KoreanCodecs/korean error_callback.py
Brought to you by:
perky
From: Hye-Shik C. <pe...@us...> - 2003-01-14 15:13:49
|
perky 03/01/14 07:13:48 Modified: korean error_callback.py Log: Fix syntax error on wrong parenthesis Revision Changes Path 1.5 +6 -5 KoreanCodecs/korean/error_callback.py Index: error_callback.py =================================================================== RCS file: /cvsroot/koco/KoreanCodecs/korean/error_callback.py,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- error_callback.py 13 Jan 2003 09:09:56 -0000 1.4 +++ error_callback.py 14 Jan 2003 15:13:44 -0000 1.5 @@ -17,7 +17,7 @@ # along with KoreanCodecs; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# $Id: error_callback.py,v 1.4 2003/01/13 09:09:56 perky Exp $ +# $Id: error_callback.py,v 1.5 2003/01/14 15:13:44 perky Exp $ # try: @@ -27,8 +27,8 @@ class UnicodeEncodeError(UnicodeError): def __init__(self, encoding, object, start, end, reason): UnicodeError.__init__(self, - "encoding '%s' can't encode characters " + - "in positions %d-%d: %s" % (encoding, + ("encoding '%s' can't encode characters " + "in positions %d-%d: %s") % (encoding, start, end-1, reason)) self.encoding = encoding self.object = object @@ -38,9 +38,10 @@ class UnicodeDecodeError(UnicodeError): def __init__(self, encoding, object, start, end, reason): + print repr((encoding, object, start, end, reason)) UnicodeError.__init__(self, - "encoding '%s' can't decode characters " + - "in positions %d-%d: %s" % (encoding, + ("encoding '%s' can't decode characters " + "in positions %d-%d: %s") % (encoding, start, end-1, reason)) self.encoding = encoding self.object = object |