Edgewall Software

Opened 9 years ago

Closed 9 years ago

#11797 closed defect (fixed)

Completion error after initenv in trac-admin — at Version 2

Reported by: Jun Omae Owned by: Jun Omae
Priority: normal Milestone: 1.0.3
Component: admin/console Version: 1.0.2
Severity: normal Keywords:
Cc: Branch:
Release Notes:

Fix Completion error after initenv command in trac-admin.

API Changes:
Internal Changes:

Description

After initenv command is executed, pressing TAB key in trac-admin prompt leads Completion error. The issue is reproduced on Trac 1.0.2 and 1.1.2.

$ trac-admin /tmp/tracenv-1.0.2
Welcome to trac-admin 1.0.2
Interactive Trac administration console.
Copyright (C) 2003-2013 Edgewall Software

Type:  '?' or 'help' for help on commands.

Trac [/tmp/tracenv-1.0.2]> initenv project sqlite:db/trac.db
Creating and Initializing Project
 Installing default wiki pages
  ....
Congratulations!

Trac [/tmp/tracenv-1.0.2]>                    # <== Press TAB key
Completion error: AttributeError: 'NoneType' object has no attribute 'complete_command'

Enabling logging with initenv --inherit=FILE, Trac says the following.

$ cat /tmp/trac.ini
[logging]
log_type = stderr
$ trac-admin /tmp/tracenv-1.0.2
...
Trac [/tmp/tracenv-1.0.2]> initenv --inherit=/tmp/trac.ini project sqlite:db/trac.db
Creating and Initializing Project
 Installing default wiki pages
  ....
Congratulations!

Trac [/tmp/tracenv-1.0.2]>                    # <== Press TAB key
20:22:10 Trac[console] ERROR: trac-admin completion error:
Traceback (most recent call last):
  File "/venv/trac/1.0.2/lib/python2.5/site-packages/trac/admin/console.py", line 247, in complete_line
    comp = self.cmd_mgr.complete_command(args, cmd_only)
AttributeError: 'NoneType' object has no attribute 'complete_command'

Change History (2)

comment:1 by Jun Omae, 9 years ago

Owner: set to Jun Omae
Status: newassigned

The issue is introduced in [12277] by me. Proposed changes in [a2a59266/jomae.git] (jomae.git@t11797).

comment:2 by Jun Omae, 9 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Committed in [13266] and merged to trunk in [13267].

Note: See TracTickets for help on using tickets.