Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion requirements/pre-dev.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruff==0.9.9
ruff==0.11.2
2 changes: 1 addition & 1 deletion samcli/local/docker/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

LOG = logging.getLogger(__name__)

CONTAINER_CONNECTION_TIMEOUT = float(os.environ.get("SAM_CLI_CONTAINER_CONNECTION_TIMEOUT", 20))
CONTAINER_CONNECTION_TIMEOUT = float(os.environ.get("SAM_CLI_CONTAINER_CONNECTION_TIMEOUT", "20"))
DEFAULT_CONTAINER_HOST_INTERFACE = "127.0.0.1"

# Keep a lock instance to access the locks for individual containers (see dict below)
Expand Down
2 changes: 1 addition & 1 deletion samcli/local/lambdafn/remote_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def unzip_from_uri(uri, layer_zip_path, unzip_output_dir, progressbar_label):
Label to use in the Progressbar
"""
try:
get_request = requests.get(uri, stream=True, verify=os.environ.get("AWS_CA_BUNDLE", True))
get_request = requests.get(uri, stream=True, verify=os.environ.get("AWS_CA_BUNDLE") or True)

with open(layer_zip_path, "wb") as local_layer_file:
file_length = int(get_request.headers["Content-length"])
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/local/lambdafn/test_remote_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_successfully_unzip_from_uri(
path_patch.assert_called_with("layer_zip_path")
path_mock.unlink.assert_called()
unzip_patch.assert_called_with("layer_zip_path", "output_zip_dir", permission=0o700)
os_patch.environ.get.assert_called_with("AWS_CA_BUNDLE", True)
os_patch.environ.get.assert_called_with("AWS_CA_BUNDLE")

@patch("samcli.local.lambdafn.remote_files.unzip")
@patch("samcli.local.lambdafn.remote_files.Path")
Expand Down Expand Up @@ -69,7 +69,7 @@ def test_not_unlink_file_when_file_doesnt_exist(
path_patch.assert_called_with("layer_zip_path")
path_mock.unlink.assert_not_called()
unzip_patch.assert_called_with("layer_zip_path", "output_zip_dir", permission=0o700)
os_patch.environ.get.assert_called_with("AWS_CA_BUNDLE", True)
os_patch.environ.get.assert_called_with("AWS_CA_BUNDLE")

@patch("samcli.local.lambdafn.remote_files.unzip")
@patch("samcli.local.lambdafn.remote_files.Path")
Expand Down Expand Up @@ -102,4 +102,4 @@ def test_unzip_from_uri_reads_AWS_CA_BUNDLE_env_var(
path_patch.assert_called_with("layer_zip_path")
path_mock.unlink.assert_called()
unzip_patch.assert_called_with("layer_zip_path", "output_zip_dir", permission=0o700)
os_patch.environ.get.assert_called_with("AWS_CA_BUNDLE", True)
os_patch.environ.get.assert_called_with("AWS_CA_BUNDLE")
Loading