Fix text generation when it's not in the config.

This commit is contained in:
yrriban 2025-07-16 02:01:05 -04:00
parent c89fde220c
commit 3cea4a3000

View file

@ -33,9 +33,9 @@ class Text(dcc.doom_base.WadMap):
def take_action(self, parsed_args):
text = None
map_names = self._config["map_names"]
map_names = self._config.get("map_names")
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:
text = sys.stdin.read().rstrip()
if not parsed_args.nomap: