libbe:command:util: fix bugdir access for complete_status and complete_severity
authorW. Trevor King <wking@tremily.us>
Thu, 13 Dec 2012 16:04:45 +0000 (11:04 -0500)
committerW. Trevor King <wking@tremily.us>
Thu, 13 Dec 2012 16:04:45 +0000 (11:04 -0500)
Fix a bug introduced by:

  commit 4db1a045a0606bead191a563abc54dfa8352efe0
  Author: W. Trevor King <wking@tremily.us>
  Date:   Wed Aug 29 23:26:17 2012 -0400

    Rewrite commands to use bugdirs instead of a single bugdir.

Reported-by: James Spencer <james.s.spencer@gmail.com>
libbe/command/util.py

index 6f7b92e4782883b36462aa48eaee0cb46f609bab..9f76ad895cdb8759968bee8137c167dfca1cb853 100644 (file)
@@ -50,12 +50,12 @@ def complete_path(command, argument, fragment=None):
     return comp_path(fragment)
 
 def complete_status(command, argument, fragment=None):
-    bd = sorted(command._get_bugdirs().items())[1]
+    bd = sorted(command._get_bugdirs().items())[0]
     import libbe.bug
     return libbe.bug.status_values
 
 def complete_severity(command, argument, fragment=None):
-    bd = sorted(command._get_bugdirs().items())[1]
+    bd = sorted(command._get_bugdirs().items())[0]
     import libbe.bug
     return libbe.bug.severity_values