Compare commits
3 Commits
714abd9857
...
2ffe2ac5f3
| Author | SHA1 | Date | |
|---|---|---|---|
| 2ffe2ac5f3 | |||
| a51c2ec2e0 | |||
| 3c5b049b1f |
@ -9,7 +9,7 @@ class GlossaryCmdError(Exception):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def get_glossary_file_path(name: str, config: Config) -> Path:
|
def get_glossary_file(name: str, config: Config) -> Path:
|
||||||
"""
|
"""
|
||||||
Get the complete filename for a glossary with the given path.
|
Get the complete filename for a glossary with the given path.
|
||||||
"""
|
"""
|
||||||
@ -48,7 +48,7 @@ def create_glossary(args: argparse.Namespace, config: Config) -> None:
|
|||||||
print("Error: please specify the target language.")
|
print("Error: please specify the target language.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
# create file or use the given one
|
# create file or use the given one
|
||||||
glo_file = Path(args.file) if args.file else get_glossary_file_path(args.name, config)
|
glo_file = Path(args.file) if args.file else get_glossary_file(args.name, config)
|
||||||
if glo_file.exists():
|
if glo_file.exists():
|
||||||
print(f"Error: glossary '{glo_file}' already exists!")
|
print(f"Error: glossary '{glo_file}' already exists!")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user