Modify

Opened 14 years ago

Closed 11 years ago

#6249 closed defect (fixed)

[Patch] Empty group file throws error

Reported by: anonymous Owned by: Ryan J Ollos
Priority: normal Component: HtGroupEditorPlugin
Severity: normal Keywords:
Cc: Robert Rossmair 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 (1)

6249.patch (933 bytes) - added by Stefan Wallentowitz 14 years ago.
Proposed patch to this ticket

Download all attachments as: .zip

Change History (11)

comment:1 Changed 14 years ago by anonymous

Cc: Robert Rossmair added; anonymous removed
Trac Release: 0.110.12

comment:2 Changed 14 years ago by Robert Rossmair

Trac Release: 0.120.11

Same here, for 0.12multirepos-r8877

comment:3 Changed 14 years ago by Stefan Wallentowitz

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

comment:4 Changed 14 years ago by anonymous

Trac Release: 0.110.12

Changed 14 years ago by Stefan Wallentowitz

Attachment: 6249.patch added

Proposed patch to this ticket

comment:5 Changed 14 years ago by Stefan Wallentowitz

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

comment:6 Changed 11 years ago by Ryan J Ollos

#8408 closed as a duplicate.

comment:7 Changed 11 years ago by Ryan J Ollos

Summary: Empty group file throws error[Patch] Empty group file throws error

comment:8 in reply to:  3 Changed 11 years ago by Ryan J Ollos

Owner: changed from robert_martin to Ryan J Ollos
Status: newassigned

Replying to wallento:

Attached you find a patch to this.

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

comment:9 Changed 11 years ago by Ryan J Ollos

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

comment:10 Changed 11 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.