Skip to content

Commit 4fc62e0

Browse files
committed
status printing for sample code
1 parent 4974fd3 commit 4fc62e0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

sample-code/start_encode3.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,17 @@
1717
line = "-" * 80 + "\n"
1818

1919
def my_callback(e):
20-
print_status(e)
20+
try:
21+
print_status(e)
22+
except BaseException as e:
23+
print str(e)
24+
2125

2226
def my_callback2(e):
23-
print_status(e)
27+
try:
28+
print_status(e)
29+
except BaseException as e:
30+
print str(e)
2431

2532
def print_status(status):
2633
if not status['error'] and status['status'] != 'error':

0 commit comments

Comments
 (0)