Fixed misleading variable name -- we're not using indices, but keys.

This commit is contained in:
Nick Bolton 2010-06-15 22:41:47 +00:00
parent 1a4af219a9
commit 755cb80254
1 changed files with 6 additions and 6 deletions

View File

@ -26,7 +26,7 @@ class InternalCommands:
prevdir = '' prevdir = ''
# by default, no index specified as arg # by default, no index specified as arg
generator_index = None generator_id = None
# by default, prompt user for input # by default, prompt user for input
no_prompts = False no_prompts = False
@ -482,9 +482,9 @@ class InternalCommands:
config.write(configfile) config.write(configfile)
def get_generator_from_config(self): def get_generator_from_config(self):
if self.generator_index: if self.generator_id:
generators = self.get_generators() generators = self.get_generators()
return generators[self.generator_index] return generators[self.generator_id]
else: else:
config = ConfigParser.RawConfigParser() config = ConfigParser.RawConfigParser()
config.read(self.config_filepath()) config.read(self.config_filepath())
@ -537,8 +537,8 @@ class InternalCommands:
generators = self.get_generators() generators = self.get_generators()
# if user has specified a generator as an argument # if user has specified a generator as an argument
if self.generator_index: if self.generator_id:
return generators[self.generator_index] return generators[self.generator_id]
# if we can accept user input # if we can accept user input
elif not self.no_prompts: elif not self.no_prompts:
@ -680,7 +680,7 @@ class CommandHandler:
if o == '--no-prompts': if o == '--no-prompts':
self.ic.no_prompts = True self.ic.no_prompts = True
elif o in ('-g', '--generator'): elif o in ('-g', '--generator'):
self.ic.generator_index = a self.ic.generator_id = a
def get_build_mode(self): def get_build_mode(self):
mode = None mode = None