Skip to content
Snippets Groups Projects
Commit 49b2d05b authored by nimrod's avatar nimrod
Browse files

Address pre-commit issues.

- Bandit complains on using urlopen, ignore since I'm using a hard-coded
URL.
- Pylint complains on the module name, rename.
- Remove the docker-compose hook, no docker-compose.yml.
parent 176c4097
No related branches found
No related tags found
No related merge requests found
Pipeline #1074 failed
......@@ -45,8 +45,6 @@ repos:
rev: v0.3.0
hooks:
- id: hadolint
- id: docker-compose
- repo: https://github.com/ambv/black
rev: 20.8b1
......
......@@ -4,7 +4,7 @@ from urllib.request import urlopen
import json
if __name__ == "__main__":
response = urlopen(
response = urlopen( # nosec
"http://169.254.169.254/latest/dynamic/instance-identity/document"
)
print(json.loads(response.read().decode("utf-8"))["region"])
......@@ -3,7 +3,7 @@ set -eux
template /var/awslogs/etc/awslogs.conf.j2 > /tmp/config
if [ -z "${AWS_DEFAULT_REGION:-}" ]
then
AWS_DEFAULT_REGION="$(deduce-aws-region)"
AWS_DEFAULT_REGION="$(deduce_aws_region)"
export AWS_DEFAULT_REGION
fi
eval exec "$@"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment