Fix text generation when it's not in the config.
This commit is contained in:
parent
c89fde220c
commit
3cea4a3000
1 changed files with 2 additions and 2 deletions
|
@ -33,9 +33,9 @@ class Text(dcc.doom_base.WadMap):
|
||||||
|
|
||||||
def take_action(self, parsed_args):
|
def take_action(self, parsed_args):
|
||||||
text = None
|
text = None
|
||||||
map_names = self._config["map_names"]
|
map_names = self._config.get("map_names")
|
||||||
if map_names is not None:
|
if map_names is not None:
|
||||||
text = map_names[f"map{parsed_args.map}"]
|
text = map_names.get(f"map{parsed_args.map}")
|
||||||
if text is None:
|
if text is None:
|
||||||
text = sys.stdin.read().rstrip()
|
text = sys.stdin.read().rstrip()
|
||||||
if not parsed_args.nomap:
|
if not parsed_args.nomap:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue