Ticket #22457

MailArchivePlugin から MailArchiveExtPlugin への移行後にチケットを表示できなくなる

Date d'ouverture: 2010-07-13 19:23 Dernière mise à jour: 2010-07-13 19:23

Rapporteur:
Propriétaire:
Type:
État:
Ouvert [Owner assigned]
Jalon:
(Aucun)
Priorité:
5 - moyen
Sévérité:
5 - moyen
Résolution:
Aucun
Fichier:
Aucun

Détails

環境

Trac 0.11.1.ja1 / Python 2.4.3 (CentOS release 5.2 (Final))

対象

http://svn.sourceforge.jp/svnroot/shibuya-trac/plugins/mailarchiveplugin/branches/mailarchiveext/0.11/mailarchive (rev 584)

現象

MailArchivePlugin(0.10) から MailArchiveExtPlugin への移行後、 チケットを開こう(http://<web_site>/trac/ticket/<ticket_id>)とするとエラーが発生するようになります。

2010-07-01 19:22:10,170 Trac[main] ERROR: unsubscriptable object
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/Trac-0.11.1.ja1-py2.4.egg/trac/web/main.py", line 234, in dispatch
    self._post_process_request(req)
  File "/usr/lib/python2.4/site-packages/Trac-0.11.1.ja1-py2.4.egg/trac/web/main.py", line 302, in _post_process_request
    f.post_process_request(req, *(None,)*extra_arg_count)
  File "build/bdist.linux-i686/egg/mastertickets/web_ui.py", line 44, in post_process_request
TypeError: unsubscriptable object
2010-07-01 19:22:10,171 Trac[main] ERROR: len() of unsized object
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/Trac-0.11.1.ja1-py2.4.egg/trac/web/main.py", line 424, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.4/site-packages/Trac-0.11.1.ja1-py2.4.egg/trac/web/main.py", line 209, in dispatch
    template, data, content_type = \
  File "/usr/lib/python2.4/site-packages/Trac-0.11.1.ja1-py2.4.egg/trac/web/main.py", line 300, in _post_process_request
    resp = f.post_process_request(req, *resp)
  File "build/bdist.linux-i686/egg/mailarchive/web_ui.py", line 323, in post_process_request
TypeError: len() of unsized object

修正案

当方では以下の修正により問題が解消しました。ご検討の上、取り込んで頂ければ幸いです。

--- TracMailArchiveExt-0.4.1_original/mailarchive/util.py	2009-12-08 21:11:47.000000000 +0900
+++ TracMailArchiveExt-0.4.1_modified/mailarchive/util.py	2010-07-01 20:06:01.000000000 +0900
@@ -87,10 +87,10 @@
     return tag.span(*data)
 
 def to_mail_ids(mail_id_plain):
-    mail_ids = []
     if mail_id_plain is None:
-        mail_ids = []
+        return []
     else:
+        mail_ids = []
         for mail_id in mail_id_plain.split(','):
             try:
                 id = int(mail_id.strip())

Ticket History (1/1 Histories)

2010-07-13 19:23 Updated by: noritoga
  • New Ticket "MailArchivePlugin から MailArchiveExtPlugin への移行後にチケットを表示できなくなる" created

Attachment File List

No attachments

Modifier

Please login to add comment to this ticket » Connexion