Skip to content

Commit 8152716

Browse files
committed
fix package name when getting font and throw error when not found
1 parent b03e759 commit 8152716

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/pyfiglet.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ def preloadFont(cls, font):
9090
Load font data if exist
9191
"""
9292
font_path = os.path.join('lib', 'fonts', '%s.flf' % font)
93-
return get_resource('ASCIIPresentation', font_path, 'ascii')
93+
data = get_resource('ASCII Presentation', font_path, 'ascii')
94+
if data is None:
95+
raise FontNotFound(font)
96+
return data
9497

9598
@classmethod
9699
def infoFont(cls, font, short=False):

0 commit comments

Comments
 (0)