From b0223cff2443ee1b758547e079ff46d96cca00d2 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Mon, 22 Feb 2021 13:02:14 +0100 Subject: [PATCH] style --- Dockerfile | 8 +++----- monatliche-forderung-ueberwachen.py | 2 +- report.tmpl | 8 ++++++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3d830fb..90d4ff8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ LABEL Maintainer="Wolfgang Hottgenroth " LABEL ImageName="registry.hottis.de/dockerized/cron-docker" ARG SMARTHOST="172.16.11.15" -ARG ADMINUSER="wolfgang.hottgenroth@icloud.com" +ARG MAILDOMAIN="hottis.de" ARG APP_DIR="/opt/app" RUN \ @@ -18,13 +18,11 @@ RUN \ sed -i \ -e "s/dc_eximconfig_configtype='local'/dc_eximconfig_configtype='satellite'/" \ -e "s/dc_smarthost=''/dc_smarthost='${SMARTHOST}'/" \ + -e "s/dc_readhost=''/dc_readhost='${MAILDOMAIN}'/" \ /etc/exim4/update-exim4.conf.conf && \ env DEBIAN_FRONTEND=noninteractive dpkg-reconfigure -f debconf exim4-config && \ mkdir -p ${APP_DIR} && \ - useradd -d ${APP_DIR} -u 1000 user && \ - echo "root: ${ADMINUSER}" >> /etc/aliases && \ - echo "user: ${ADMINUSER}" >> /etc/aliases && \ - newaliases + useradd -d ${APP_DIR} -u 1000 user COPY crontab /etc/ COPY *.py ${APP_DIR}/ diff --git a/monatliche-forderung-ueberwachen.py b/monatliche-forderung-ueberwachen.py index 8274d3c..7d8e6c7 100755 --- a/monatliche-forderung-ueberwachen.py +++ b/monatliche-forderung-ueberwachen.py @@ -33,7 +33,7 @@ try: mietersToReport.append({ 'vorname': mieter['vorname'], 'nachname': mieter['nachname'], - 'saldo': "{10.2f}".format(saldoByMieter['saldo']) + 'saldo': "{:.2f}".format(saldoByMieter['saldo']) }) params = { 'mietersToReport': mietersToReport } report = Template(file=TEMPLATE_FILE, searchList=[ params ]) diff --git a/report.tmpl b/report.tmpl index 807889d..948ec34 100644 --- a/report.tmpl +++ b/report.tmpl @@ -1,11 +1,15 @@ - + + + #for $mieter in $mietersToReport - + #end for
$mieter.vorname $mieter.nachname$mieter.saldo €$mieter.saldo €