files.append(local_xdg)
if os.path.exists(local):
files.append(local)
- if os.path.exists(file):
- files.append(file)
+
+ files.append(file)
+ if not os.path.exists(file):
+ raise ConfigException(f'"{file}": No such file or directory') from None
for f in files:
exec(Path(str(f)).read_text(), {}, config)
parser.add_argument(
"-c",
"--config",
+ metavar="path",
type=str,
+ default="/dev/null",
help="specify custom config file",
)
parser.add_argument(
metavar="view",
type=int,
choices=range(1, 4),
- help="specify which view to start in (default = 1)",
+ help="specify which view to start in",
)
parser.add_argument("inp", metavar="input file", type=str, nargs=1)
parser.add_argument(