Skip to content

Commit 815d24d

Browse files
committed
Fix call to figlet library so it works on AWS
1 parent 3170256 commit 815d24d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

example/service.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/usr/bin/env python
2-
import subprocess
2+
3+
from pyfiglet import Figlet
4+
35
def handler(event, context):
4-
return subprocess.check_output( ['pyfiglet', '-f', event.get('font', 'small'), event.get('text', '') ] ).decode('ascii')
6+
f = Figlet( font=event.get('font', 'small') )
7+
return f.renderText( event.get('text', '') )
8+

0 commit comments

Comments
 (0)