Ticket #6249 (closed defect: fixed)

Opened 3 years ago

Last modified 5 days ago

[Patch] Empty group file throws error

Reported by: anonymous Assigned to: rjollos
Priority: normal Component: HtGroupEditorPlugin
Severity: normal Keywords:
Cc: r.rossmair@ollendorf.biz Trac Release: 0.12

Description

If the group file is empty the following error is thrown

Trac detected an internal error:
AttributeError: 'NoneType' object has no attribute 'keys'

Most recent call last:
File "/usr/local/lib/python2.6/dist-packages/Trac-0.11.5-py2.6.egg/trac/web/main.py", line 444, in _dispatch_request
File "/usr/local/lib/python2.6/dist-packages/Trac-0.11.5-py2.6.egg/trac/web/main.py", line 205, in dispatch
File "/usr/local/lib/python2.6/dist-packages/Trac-0.11.5-py2.6.egg/trac/admin/web_ui.py", line 114, in process_request
File "build/bdist.linux-x86_64/egg/htgroupeditor/htgroupeditor.py", line 145, in render_admin_panel

It should just bring up the default screen with no selectable groups.

Attachments

6249.patch (0.9 kB) - added by wallento on 02/17/10 21:24:27.
Proposed patch to this ticket

Change History

12/06/09 17:38:49 changed by anonymous

  • release changed from 0.11 to 0.12.
  • cc set to r.rossmair@ollendorf.biz.

12/06/09 17:39:54 changed by r.rossmair@ollendorf.biz

  • release changed from 0.12 to 0.11.

Same here, for 0.12multirepos-r8877

(follow-up: ↓ 8 ) 02/17/10 18:27:09 changed by wallento

Attached you find a patch to this.

The list is created from the file. In the POST case, that can only happen when the GET was taken before, the list cannot be empty; otherwise no POST is possible (correct?).

In the other cases (GET), the list is checked to be empty. If so, just the empty entry is added. In other cases the groups are listed as usual.

Please review it before testing.

HTH, Stefan

02/17/10 18:39:11 changed by anonymous

  • release changed from 0.11 to 0.12.

02/17/10 21:24:27 changed by wallento

  • attachment 6249.patch added.

Proposed patch to this ticket

02/17/10 21:25:34 changed by wallento

The previous patch had an error in using append(...) instead of concattenation. Sorry..

05/14/13 02:29:27 changed by rjollos

#8408 closed as a duplicate.

05/14/13 02:29:46 changed by rjollos

  • summary changed from Empty group file throws error to [Patch] Empty group file throws error.

(in reply to: ↑ 3 ) 05/14/13 10:06:35 changed by rjollos

  • owner changed from robert_martin to rjollos.
  • status changed from new to assigned.

Replying to wallento:

Attached you find a patch to this.

Patch looks great. Sorry it took so long for us to get this applied!

05/14/13 10:27:33 changed by rjollos

(In [13122]) Refs #6249: Avoid traceback when the htgroups file is empty. Patch by wallento.

05/14/13 10:35:47 changed by rjollos

  • status changed from assigned to closed.
  • resolution set to fixed.

Add/Change #6249 ([Patch] Empty group file throws error)




Change Properties
Action