Opened 15 years ago
Closed 12 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)
Change History (11)
comment:1 Changed 15 years ago by
Cc: | Robert Rossmair added; anonymous removed |
---|---|
Trac Release: | 0.11 → 0.12 |
comment:2 Changed 15 years ago by
Trac Release: | 0.12 → 0.11 |
---|
comment:3 follow-up: 8 Changed 15 years ago by
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 15 years ago by
Trac Release: | 0.11 → 0.12 |
---|
comment:5 Changed 15 years ago by
The previous patch had an error in using append(...)
instead of concattenation. Sorry..
comment:7 Changed 12 years ago by
Summary: | Empty group file throws error → [Patch] Empty group file throws error |
---|
comment:8 Changed 12 years ago by
Owner: | changed from robert_martin to Ryan J Ollos |
---|---|
Status: | new → 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!
comment:9 Changed 12 years ago by
comment:10 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Same here, for 0.12multirepos-r8877