diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2018-10-14 17:21:15 +0200 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2018-10-14 17:21:15 +0200 |
commit | a74f3b6856ca1a5e4425bcad39ac3706009ef538 (patch) | |
tree | 5ba4aaee67a1043d8f22cbc06877ece0cfc9cedf /src | |
parent | c1f690be93862256e8d231f548ed656ab7b2030f (diff) | |
download | blogc-a74f3b6856ca1a5e4425bcad39ac3706009ef538.tar.gz blogc-a74f3b6856ca1a5e4425bcad39ac3706009ef538.tar.bz2 blogc-a74f3b6856ca1a5e4425bcad39ac3706009ef538.zip |
github-lambda: print traceback on errors
Diffstat (limited to 'src')
-rw-r--r-- | src/blogc-github-lambda/lambda_function.py.in | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/blogc-github-lambda/lambda_function.py.in b/src/blogc-github-lambda/lambda_function.py.in index a6cdc6f..b31b75e 100644 --- a/src/blogc-github-lambda/lambda_function.py.in +++ b/src/blogc-github-lambda/lambda_function.py.in @@ -22,9 +22,10 @@ import hashlib import json import mimetypes import os +import shutil import subprocess import tarfile -import shutil +import traceback try: import urllib.request as urllib2 except ImportError: @@ -240,6 +241,7 @@ def api_gateway_handler(event): try: blogc_handler(body) except Exception as err: + traceback.print_exc() return api_gateway_response(500, 'ERROR: %s' % err) return api_gateway_response(201, 'ACCEPTED') |