#762: UnboundLocalError from trac-admin console command
---------------------------+---------------------------
Reporter: rjollos | Owner: rjollos
Type: defect | Status: assigned
Priority: minor | Milestone: Release 9
Component: multiproduct | Version: 0.8.0dev
Resolution: | Keywords: admin console
---------------------------+---------------------------
Changes (by olemis):
* owner: olemis => rjollos
* status: accepted => assigned
Comment:
Replying to [ticket:762 rjollos]:
> Another minor issue:
>
> If `$env` is not an environment directory and `cmd` is not a valid
command:
> {{{
> $ trac-admin ../tracdev help cmd
> No documentation found for 'cmd'. Use 'help' to see the list of
commands.
> UnboundLocalError: local variable 'cmd_mgr' referenced before assignment
> }}}
>
> The first line of output is correct, but we want to avoid the
!UnboundLocalError.
>
> Discovered while working on #756 and #757.
I have tracked this down to
[trac:source:branches/1.0-stable/trac/admin/console.py@12277:305-336#L305
these lines] , so it seems this will be solved after merging
Trac=1.0-stable in our vendor branch . Notice that `cmd_mgr` is not an
instance attribute in ours . This combined with one assignment done in a
single branch of a loop yields the results you reported in
[#comment:description ticket description] .
@rjollos : Therefore I'm reassigning this ticket back to you .
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/762#comment:2>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker