Skip to content

Commit

Permalink
fixup: build docker alpine 316
Browse files Browse the repository at this point in the history
  • Loading branch information
morrieinmaas committed Jul 1, 2024
1 parent 1b0c770 commit e9872da
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM alpine:3.12
LABEL Maintainer="Michael Stella <michael@jwplayer.com>"
FROM alpine:3.16
LABEL Maintainer="Team DevOps <devops@jwplayer.com>"

ARG PIP_EXTRA_INDEX_URL
ENV PYTHON_EGG_CACHE=/tmp \
Expand All @@ -19,8 +19,11 @@ RUN apk add --no-cache \
ca-certificates \
libssl1.1 \
python3 \
gcc \
musl-dev \
py3-multidict \
py3-pip \
python3-dev \
py3-setuptools \
py3-yarl \
tini \
Expand All @@ -36,7 +39,7 @@ RUN cp /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ >/etc/timezone && apk
COPY rssalertbot /app/rssalertbot
COPY CHANGELOG.rst MANIFEST.in setup.py /app/
WORKDIR /app
RUN pip install -U pip
RUN pip install setuptools==57.5.0
RUN pip install -e '.[dynamo,slack]'

# don't run as root
Expand Down
13 changes: 9 additions & 4 deletions rssalertbot/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import os
import yaml

from box import Box
from box import Box, BoxList
from .util import deepmerge

log = logging.getLogger(__name__)
Expand Down Expand Up @@ -134,9 +134,14 @@ def merge_dict(self, data):
"""
Merge a dictionary into the config.
"""

if not isinstance(data, dict):
raise TypeError("Argument 'data' must be of type 'dict'")
if isinstance(data, Box):
data = data.to_dict()
if isinstance(data, BoxList):
data = dict(data.to_list())

if type(data) != type({}): # noqa: E721

raise TypeError(f"Argument 'data' must be of type 'dict' not {type(data)}")

self.update(deepmerge(self.to_dict(), data))

Expand Down

0 comments on commit e9872da

Please # to comment.