in switching this to use pathlib, the template names were coming out
as long absolute paths
Change-Id: I3ba7de601a11fbd28e96c63e7bdcfd4accdfd858
config.print_stdout("Available templates:\n")
for tempname in config._get_template_path().iterdir():
- with (
- config._get_template_path() / tempname / "README"
- ).open() as readme:
+ with (tempname / "README").open() as readme:
synopsis = next(readme).rstrip()
- config.print_stdout("%s - %s", tempname, synopsis)
+ config.print_stdout("%s - %s", tempname.name, synopsis)
config.print_stdout("\nTemplates are used via the 'init' command, e.g.:")
config.print_stdout("\n alembic init --template generic ./scripts")