Skip to content

Commit 93b1483

Browse files
committed
Improve error reporting when renaming fonts.
Log a better error in case of invalid input. Change-Id: Ifb122c1cc624111769e650439aa24290155dbbc4
1 parent 3afd00e commit 93b1483

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tools/layoutlib/rename_font/build_font_single.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
OpenType fonts (*.otf) are not currently supported. They are copied to the destination without renaming.
2121
XML files are also copied in case they are passed there by mistake.
2222
23-
Usage: build_font.py /path/to/input_font.ttf /path/to/output_font.ttf
23+
Usage: build_font_single.py /path/to/input_font.ttf /path/to/output_font.ttf
2424
2525
"""
2626

@@ -67,7 +67,8 @@ class InvalidFontException(Exception):
6767

6868
def main(argv):
6969
if len(argv) < 2:
70-
sys.exit('Usage: build_font.py /path/to/input/font.ttf /path/to/out/font.ttf')
70+
print 'Incorrect usage: ' + str(argv)
71+
sys.exit('Usage: build_font_single.py /path/to/input/font.ttf /path/to/out/font.ttf')
7172
dest_path = argv[-1]
7273
input_path = argv[0]
7374
extension = os.path.splitext(input_path)[1].lower()

0 commit comments

Comments
 (0)