Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging for failed import (of runtime_client) #130

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions awslambdaric/lambda_runtime_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
"""

import sys
import logging

from awslambdaric import __version__
from .lambda_runtime_exception import FaultException


def _user_agent():
py_version = (
f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}"
Expand All @@ -19,8 +20,8 @@ def _user_agent():
import runtime_client

runtime_client.initialize_client(_user_agent())
except ImportError:
runtime_client = None
except ImportError as import_error:
logging.fatal('Failed to import "runtime_client" cpp file. %s', import_error)

from .lambda_runtime_marshaller import LambdaMarshaller

Expand Down