From 49808306c939de24acabc423024970a76055e52b Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Thu, 31 Oct 2013 18:46:09 +0100 Subject: Incorrect accquiring bugdir command line argument The calling below seems like a typo to me. How can we index with a variable which has not been initialized yet? --- libbe/command/new.py | 2 +- libbe/command/set.py | 2 +- libbe/command/target.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'libbe/command') diff --git a/libbe/command/new.py b/libbe/command/new.py index 6e94e79..33ede50 100644 --- a/libbe/command/new.py +++ b/libbe/command/new.py @@ -118,7 +118,7 @@ class New (libbe.command.Command): storage = self._get_storage() bugdirs = self._get_bugdirs() if params['bugdir']: - bugdir = bugdirs[bugdir] + bugdir = bugdirs[params['bugdir']] elif len(bugdirs) == 1: bugdir = bugdirs.values()[0] else: diff --git a/libbe/command/set.py b/libbe/command/set.py index 9413a13..d552878 100644 --- a/libbe/command/set.py +++ b/libbe/command/set.py @@ -77,7 +77,7 @@ class Set (libbe.command.Command): def _run(self, **params): bugdirs = self._get_bugdirs() if params['bugdir']: - bugdir = bugdirs[bugdir] + bugdir = bugdirs[params['bugdir']] elif len(bugdirs) == 1: bugdir = bugdirs.values()[0] else: diff --git a/libbe/command/target.py b/libbe/command/target.py index 20ffb57..9f76303 100644 --- a/libbe/command/target.py +++ b/libbe/command/target.py @@ -99,7 +99,7 @@ class Target (libbe.command.Command): bugdirs = self._get_bugdirs() if params['resolve'] == True: if params['bugdir']: - bugdir = bugdirs[bugdir] + bugdir = bugdirs[params['bugdir']] elif len(bugdirs) == 1: bugdir = bugdirs.values()[0] else: -- cgit