Skip to content

Commit

Permalink
fix package name when getting font and throw error when not found
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbreiding committed Jul 5, 2014
1 parent b03e759 commit 8152716
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/pyfiglet.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ def preloadFont(cls, font):
Load font data if exist
"""
font_path = os.path.join('lib', 'fonts', '%s.flf' % font)
return get_resource('ASCIIPresentation', font_path, 'ascii')
data = get_resource('ASCII Presentation', font_path, 'ascii')
if data is None:
raise FontNotFound(font)
return data

@classmethod
def infoFont(cls, font, short=False):
Expand Down

0 comments on commit 8152716

Please sign in to comment.