Skip to content

Commit 0e47c12

Browse files
Make handler code more compact
1 parent a41f6a3 commit 0e47c12

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

example/service.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
#!/usr/bin/env python
2-
32
import subprocess
4-
import json
5-
63
def handler(event, context):
7-
font=event.get('font', 'Small')
8-
text=event.get('text', '')
9-
return subprocess.check_output( ['xart', '-f', font, text ] )
4+
return subprocess.check_output( ['xart', '-f', event.get('font', 'Small'), event.get('text', '') ] )

0 commit comments

Comments
 (0)