Skip to content

Commit 1a2b6ad

Browse files
authored
Merge pull request #84 from cisagov/bugfix/fix-syntax-error
Fix syntax error
2 parents 2896383 + dbec470 commit 1a2b6ad

5 files changed

+22
-19
lines changed

README.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ expects the secrets in a different location.
3333
To run the `cisagov/saver` image via Docker:
3434

3535
```console
36-
docker run cisagov/saver:1.3.5
36+
docker run cisagov/saver:1.3.6
3737
```
3838

3939
### Running with Docker Compose ###
@@ -46,7 +46,7 @@ docker run cisagov/saver:1.3.5
4646

4747
services:
4848
saver:
49-
image: cisagov/saver:1.3.5
49+
image: cisagov/saver:1.3.6
5050
volumes:
5151
- type: bind
5252
source: <your_log_dir>
@@ -92,7 +92,7 @@ environment variables. See the
9292
9393
services:
9494
trustymail_reporter:
95-
image: cisagov/saver:1.3.5
95+
image: cisagov/saver:1.3.6
9696
volumes:
9797
- type: bind
9898
source: <your_log_dir>
@@ -129,7 +129,7 @@ environment variables. See the
129129
1. Pull the new image:
130130

131131
```console
132-
docker pull cisagov/saver:1.3.5
132+
docker pull cisagov/saver:1.3.6
133133
```
134134

135135
1. Recreate and run the container by following the [previous instructions](#running-with-docker).
@@ -139,11 +139,11 @@ environment variables. See the
139139
The images of this container are tagged with [semantic
140140
versions](https://semver.org) of the underlying saver project that they
141141
containerize. It is recommended that most users use a version tag (e.g.
142-
`:1.3.5`).
142+
`:1.3.6`).
143143

144144
| Image:tag | Description |
145145
|-----------|-------------|
146-
|`cisagov/saver:1.3.5`| An exact release version. |
146+
|`cisagov/saver:1.3.6`| An exact release version. |
147147
|`cisagov/saver:1.3`| The most recent release matching the major and minor version numbers. |
148148
|`cisagov/saver:1`| The most recent release matching the major version number. |
149149
|`cisagov/saver:edge` | The most recent image built from a merge into the `develop` branch of this repository. |
@@ -206,8 +206,8 @@ Build the image locally using this git repository as the [build context](https:/
206206

207207
```console
208208
docker build \
209-
--build-arg VERSION=1.3.5 \
210-
--tag cisagov/saver:1.3.5 \
209+
--build-arg VERSION=1.3.6 \
210+
--tag cisagov/saver:1.3.6 \
211211
https://github.com/cisagov/saver.git#develop
212212
```
213213

@@ -237,9 +237,9 @@ Docker:
237237
docker buildx build \
238238
--file Dockerfile-x \
239239
--platform linux/amd64 \
240-
--build-arg VERSION=1.3.5 \
240+
--build-arg VERSION=1.3.6 \
241241
--output type=docker \
242-
--tag cisagov/saver:1.3.5 .
242+
--tag cisagov/saver:1.3.6 .
243243
```
244244

245245
## Contributing ##

src/pshtt_csv2mongo.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44

55
# Standard Python Libraries
66
import csv
7-
from datetime import datetime, time, timezone
7+
from datetime import datetime, time
88
import os
99
import re
10+
from zoneinfo import ZoneInfo
1011

1112
# Third-Party Libraries
1213
from mongo_db_from_config import db_from_config
@@ -103,7 +104,7 @@ def store_data(clean_federal, agency_dict, db_config_file):
103104
:param db_config_file: The name of the file where the database
104105
configuration is stored
105106
"""
106-
date_today = datetime.combine(datetime.now(timezone.utc), time.min)
107+
date_today = datetime.combine(datetime.now(ZoneInfo("UTC")), time.min)
107108
db = db_from_config(db_config_file) # set up database connection
108109
f = open(PSHTT_RESULTS_FILE)
109110
csv_f = csv.DictReader(f)

src/sslyze_csv2mongo.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44

55
# Standard Python Libraries
66
import csv
7-
from datetime import datetime, time, timezone
7+
from datetime import datetime, time
88
import os
9+
from zoneinfo import ZoneInfo
910

1011
# Third-Party Libraries
1112
from mongo_db_from_config import db_from_config
@@ -102,7 +103,7 @@ def store_data(clean_federal, agency_dict, db_config_file):
102103
:param db_config_file: The name of the file where the database
103104
configuration is stored
104105
"""
105-
date_today = datetime.combine(datetime.now(timezone.utc), time.min)
106+
date_today = datetime.combine(datetime.now(ZoneInfo("UTC")), time.min)
106107
db = db_from_config(db_config_file) # set up database connection
107108
f = open(SSLYZE_RESULTS_FILE)
108109
csv_f = csv.DictReader(f)
@@ -180,9 +181,9 @@ def store_data(clean_federal, agency_dict, db_config_file):
180181
date_items = ("Not Before", "Not After")
181182
for date_item in date_items:
182183
if row[date_item]:
183-
row[date_item] = datetime.datetime.strptime(
184+
row[date_item] = datetime.strptime(
184185
row[date_item], "%Y-%m-%dT%H:%M:%S"
185-
).replace(tzinfo=timezone("US/Eastern"))
186+
).replace(tzinfo=ZoneInfo("America/New_York"))
186187
else:
187188
row[date_item] = None
188189

src/trustymail_csv2mongo.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44

55
# Standard Python Libraries
66
import csv
7-
from datetime import datetime, time, timezone
7+
from datetime import datetime, time
88
import os
9+
from zoneinfo import ZoneInfo
910

1011
# Third-Party Libraries
1112
from mongo_db_from_config import db_from_config
@@ -101,7 +102,7 @@ def store_data(clean_federal, agency_dict, db_config_file):
101102
:param db_config_file: The name of the file where the database
102103
configuration is stored
103104
"""
104-
date_today = datetime.combine(datetime.now(timezone.utc), time.min)
105+
date_today = datetime.combine(datetime.now(ZoneInfo("UTC")), time.min)
105106
db = db_from_config(db_config_file) # set up database connection
106107
f = open(TRUSTYMAIL_RESULTS_FILE)
107108
csv_f = csv.DictReader(f)

src/version.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.3.5"
1+
__version__ = "1.3.6"

0 commit comments

Comments
 (0)