Skip to content

Commit 1cfedb6

Browse files
committed
Code Review cleanup
Improvements at @pwaller's suggestion.
1 parent 8cbb21e commit 1cfedb6

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
/build/
55
/dist/
66
/pyfiglet.egg-info/
7+
env*/

pyfiglet/test.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ def __init__(self, opts):
3333
self.fail = 0
3434
self.failed = []
3535
self.oked = []
36-
# known bugs..
37-
self.skip = ['runic', 'pyramid', 'eftifont', 'DANC4', 'dietcola']
36+
# known bugs...
37+
self.skip = ['runic', 'pyramid', 'eftifont', 'DANC4', 'dietcola']
3838
# Toilet fonts that we don't handle identically, yet
3939
self.skip += ['emboss', 'emboss2', 'future', 'letter', 'pagga',
4040
'smblock', 'smbraille', 'wideterm']
@@ -48,16 +48,14 @@ def outputUsingFigletorToilet(self, text, font, fontpath):
4848
elif os.path.isfile(fontpath + '.tlf'):
4949
cmd = ('toilet', '-d', 'pyfiglet/fonts', '-f', font, text)
5050
else:
51-
raise Exception('Missing font file: '+fontpath)
51+
raise Exception('Missing font file: {}'.format(fontpath))
5252

5353
p = Popen(cmd, bufsize=4096, stdout=PIPE)
5454
try:
5555
outputFiglet = p.communicate()[0].decode('utf8')
5656
except UnicodeDecodeError as e:
5757
print("Unicode Error handling font {}".format(font))
5858
outputFiglet = ''
59-
except e:
60-
raise e
6159
return outputFiglet
6260

6361
def validate_font_output(self, font, outputFiglet, outputPyfiglet):

0 commit comments

Comments
 (0)