core:Label Remove redundant test for file and pep8 fix

This commit is contained in:
akshayaurora 2015-12-04 04:39:53 +05:30
parent 1360355990
commit dba00cac54
2 changed files with 5 additions and 4 deletions

View File

@ -109,7 +109,9 @@ class CodeInputTest(App):
values=list(map(str, list(range(5, 40)))))
fnt_size.bind(text=self._update_size)
fonts = [file for file in LabelBase._font_dirs_files if file.endswith('.ttf')]
fonts = [
file for file in LabelBase._font_dirs_files
if file.endswith('.ttf')]
fnt_name = Spinner(
text='RiobotoMono',

View File

@ -293,9 +293,8 @@ class LabelBase(object):
for fdir in fdirs:
for _dir, dirs, files in os.walk(fdir):
_font_dir_files.extend(files)
if os.path.exists(_dir):
resource_add_path(_dir)
rdirs.append(_dir)
resource_add_path(_dir)
rdirs.append(_dir)
LabelBase._fonts_dirs = rdirs
LabelBase._font_dirs_files = _font_dir_files