checkbox-cli crashes without any providers

Bug #1319481 reported by Zygmunt Krynicki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Next Generation Checkbox (CLI)
Fix Released
Medium
Zygmunt Krynicki

Bug Description

Tested on fresh install of 12.04 with the checkbox-dev/ppa enabled, installed plainbox and checkbox-ng

zyga@lucayan:~$ checkbox-cli
Plik wykonywalny 'checkbox' uruchomiony z Namespace(check_config=False, command=<checkbox_ng.commands.cli.CliCommand object at 0x3850fd0>, debug_console=False, debug_interrupt=False, exclude_pattern_list=[], include_pattern_list=[], log_level=None, not_interactive=False, pdb=False, providers=None, trace=[], whitelist=[]) uległ awarii
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/plainbox/impl/clitools.py", line 513, in dispatch_and_catch_exceptions
    return self.dispatch_command(ns)
  File "/usr/lib/python3/dist-packages/plainbox/impl/clitools.py", line 509, in dispatch_command
    return ns.command.invoked(ns)
  File "/usr/lib/python3/dist-packages/checkbox_ng/commands/cli.py", line 615, in invoked
    self.settings, ns).run()
  File "/usr/lib/python3/dist-packages/checkbox_ng/commands/cli.py", line 298, in run
    whitelists[s]))
IndexError: list index out of range
Traceback (most recent call last):
  File "/usr/bin/checkbox-cli", line 9, in <module>
    load_entry_point('checkbox-ng==0.4.dev', 'console_scripts', 'checkbox-cli')()
  File "/usr/lib/python3/dist-packages/checkbox_ng/main.py", line 174, in checkbox_cli
    CheckBoxNGTool().main(['checkbox-cli'] + args))
  File "/usr/lib/python3/dist-packages/plainbox/impl/clitools.py", line 291, in main
    return self.dispatch_and_catch_exceptions(ns)
  File "/usr/lib/python3/dist-packages/plainbox/impl/clitools.py", line 513, in dispatch_and_catch_exceptions
    return self.dispatch_command(ns)
  File "/usr/lib/python3/dist-packages/plainbox/impl/clitools.py", line 509, in dispatch_command
    return ns.command.invoked(ns)
  File "/usr/lib/python3/dist-packages/checkbox_ng/commands/cli.py", line 615, in invoked
    self.settings, ns).run()
  File "/usr/lib/python3/dist-packages/checkbox_ng/commands/cli.py", line 298, in run
    whitelists[s]))
IndexError: list index out of range

Tags: sru

Related branches

Zygmunt Krynicki (zyga)
Changed in checkbox-ng:
importance: Undecided → Medium
assignee: nobody → Zygmunt Krynicki (zkrynicki)
milestone: none → 0.4
status: New → In Progress
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

This is caused by bad defaults in ui.py in the ShowMenu class. The attribute self.selection = [0] is wrong as menu may be empty.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

This can be easily tested by setting PROVIDER_PATH=/ (in the shell) as that will make plainbox miss all of the normally-installed providers.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

that should be PROVIDERPATH

Zygmunt Krynicki (zyga)
tags: added: sru
Zygmunt Krynicki (zyga)
Changed in checkbox-ng:
status: In Progress → Fix Committed
Changed in checkbox-ng:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.