Handle KeyError
This commit is contained in:
parent
9c49f65d85
commit
ebb1652e79
1 changed files with 6 additions and 1 deletions
|
@ -284,7 +284,12 @@ class Installer:
|
||||||
|
|
||||||
ui.info(ui.green, program)
|
ui.info(ui.green, program)
|
||||||
ui.info("-" * len(program))
|
ui.info("-" * len(program))
|
||||||
todo = self.conf[program]
|
|
||||||
|
try:
|
||||||
|
todo = self.conf[program]
|
||||||
|
except KeyError:
|
||||||
|
ui.fatal("'{}' wasn't found in conf file.".format(program))
|
||||||
|
|
||||||
for action in todo:
|
for action in todo:
|
||||||
name = list(action.keys())[0]
|
name = list(action.keys())[0]
|
||||||
params = action[name]
|
params = action[name]
|
||||||
|
|
Loading…
Add table
Reference in a new issue