[o2on-svn] [155] throw Exception which contain dat filename.

Back to archive index

o2on svn commit o2on-****@lists*****
2009年 8月 9日 (日) 09:31:10 JST


Revision: 155
          http://sourceforge.jp/projects/o2on/svn/view?view=rev&revision=155
Author:   nawota
Date:     2009-08-09 09:31:10 +0900 (Sun, 09 Aug 2009)

Log Message:
-----------
throw Exception which contain dat filename.

Modified Paths:
--------------
    trunk/opy2on/lib/o2on_key.py

Modified: trunk/opy2on/lib/o2on_key.py
===================================================================
--- trunk/opy2on/lib/o2on_key.py	2009-08-09 00:05:14 UTC (rev 154)
+++ trunk/opy2on/lib/o2on_key.py	2009-08-09 00:31:10 UTC (rev 155)
@@ -59,7 +59,8 @@
         except UnicodeDecodeError, inst:
             try:
                 first = first.decode('euc_jp').encode('utf-8')
-            except UnicodeDecodeError, inst: raise inst
+            except UnicodeDecodeError, inst: 
+                raise Exception("Couldn't decode first line %s" % dat.datpath())
         m = re.compile(r'^.*<>.*<>.*<>.*<>(.*)$').match(first)
         if m: self.title = m.group(1)
         #reg = re.compile(r'^(?:2ch\.net|machibbs\.com)/(?:cyugoku|hokkaidou|k(?:an(?:a|to)|inki|(?:ousinet|yusy)u)|o(?:(?:kinaw|sak)a)|sikoku|t(?:a(?:(?:m|war)a)|o(?:kyo|u(?:hoku|kai))))')




o2on-svn メーリングリストの案内
Back to archive index