Add collect_glyphstr_file_pairs(verbosity=1) param
Currently `verbosity` is an undefined name and line 201 will raise a `NameError` when executed. The only other place in this repo where `verbosity` is defined is as a function parameter to [do_generate_test_html()](5e1808fbbe/generate_test_html.py (L28)
) with a default value of `verbosity=1`.
Someone who really understands the functioning of this code should __carefully review this change before merging it__. My sense is that this approach is better than raising a NameError but perhaps I am all wet.
pull/159/head
parent
8a6530b7b2
commit
a40f35525f
|
@ -171,7 +171,7 @@ class FontBuilder(object):
|
|||
self.svgs.append(svg_record)
|
||||
|
||||
|
||||
def collect_glyphstr_file_pairs(prefix, ext, include=None, exclude=None):
|
||||
def collect_glyphstr_file_pairs(prefix, ext, include=None, exclude=None, verbosity=1):
|
||||
"""Scan files with the given prefix and extension, and return a list of
|
||||
(glyphstr, filename) where glyphstr is the character or ligature, and filename
|
||||
is the image file associated with it. The glyphstr is formed by decoding the
|
||||
|
@ -199,7 +199,7 @@ def collect_glyphstr_file_pairs(prefix, ext, include=None, exclude=None):
|
|||
|
||||
if ex and ex.search(image_file):
|
||||
if verbosity > 1:
|
||||
print "Exclude %s" % image_file
|
||||
print("Exclude %s" % image_file)
|
||||
ex_count += 1
|
||||
continue
|
||||
|
||||
|
|
Loading…
Reference in New Issue