diff --git a/dcc/text.py b/dcc/text.py index a349a62..af06ebb 100644 --- a/dcc/text.py +++ b/dcc/text.py @@ -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: