Skip to content

Commit

Permalink
Merge pull request #84 from cisagov/bugfix/fix-syntax-error
Browse files Browse the repository at this point in the history
Fix syntax error
  • Loading branch information
jsf9k authored Feb 26, 2024
2 parents 2896383 + dbec470 commit 1a2b6ad
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 19 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ expects the secrets in a different location.
To run the `cisagov/saver` image via Docker:

```console
docker run cisagov/saver:1.3.5
docker run cisagov/saver:1.3.6
```

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

services:
saver:
image: cisagov/saver:1.3.5
image: cisagov/saver:1.3.6
volumes:
- type: bind
source: <your_log_dir>
Expand Down Expand Up @@ -92,7 +92,7 @@ environment variables. See the
services:
trustymail_reporter:
image: cisagov/saver:1.3.5
image: cisagov/saver:1.3.6
volumes:
- type: bind
source: <your_log_dir>
Expand Down Expand Up @@ -129,7 +129,7 @@ environment variables. See the
1. Pull the new image:

```console
docker pull cisagov/saver:1.3.5
docker pull cisagov/saver:1.3.6
```

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

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

```console
docker build \
--build-arg VERSION=1.3.5 \
--tag cisagov/saver:1.3.5 \
--build-arg VERSION=1.3.6 \
--tag cisagov/saver:1.3.6 \
https://github.com/cisagov/saver.git#develop
```

Expand Down Expand Up @@ -237,9 +237,9 @@ Docker:
docker buildx build \
--file Dockerfile-x \
--platform linux/amd64 \
--build-arg VERSION=1.3.5 \
--build-arg VERSION=1.3.6 \
--output type=docker \
--tag cisagov/saver:1.3.5 .
--tag cisagov/saver:1.3.6 .
```

## Contributing ##
Expand Down
5 changes: 3 additions & 2 deletions src/pshtt_csv2mongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

# Standard Python Libraries
import csv
from datetime import datetime, time, timezone
from datetime import datetime, time
import os
import re
from zoneinfo import ZoneInfo

# Third-Party Libraries
from mongo_db_from_config import db_from_config
Expand Down Expand Up @@ -103,7 +104,7 @@ def store_data(clean_federal, agency_dict, db_config_file):
:param db_config_file: The name of the file where the database
configuration is stored
"""
date_today = datetime.combine(datetime.now(timezone.utc), time.min)
date_today = datetime.combine(datetime.now(ZoneInfo("UTC")), time.min)
db = db_from_config(db_config_file) # set up database connection
f = open(PSHTT_RESULTS_FILE)
csv_f = csv.DictReader(f)
Expand Down
9 changes: 5 additions & 4 deletions src/sslyze_csv2mongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

# Standard Python Libraries
import csv
from datetime import datetime, time, timezone
from datetime import datetime, time
import os
from zoneinfo import ZoneInfo

# Third-Party Libraries
from mongo_db_from_config import db_from_config
Expand Down Expand Up @@ -102,7 +103,7 @@ def store_data(clean_federal, agency_dict, db_config_file):
:param db_config_file: The name of the file where the database
configuration is stored
"""
date_today = datetime.combine(datetime.now(timezone.utc), time.min)
date_today = datetime.combine(datetime.now(ZoneInfo("UTC")), time.min)
db = db_from_config(db_config_file) # set up database connection
f = open(SSLYZE_RESULTS_FILE)
csv_f = csv.DictReader(f)
Expand Down Expand Up @@ -180,9 +181,9 @@ def store_data(clean_federal, agency_dict, db_config_file):
date_items = ("Not Before", "Not After")
for date_item in date_items:
if row[date_item]:
row[date_item] = datetime.datetime.strptime(
row[date_item] = datetime.strptime(
row[date_item], "%Y-%m-%dT%H:%M:%S"
).replace(tzinfo=timezone("US/Eastern"))
).replace(tzinfo=ZoneInfo("America/New_York"))
else:
row[date_item] = None

Expand Down
5 changes: 3 additions & 2 deletions src/trustymail_csv2mongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

# Standard Python Libraries
import csv
from datetime import datetime, time, timezone
from datetime import datetime, time
import os
from zoneinfo import ZoneInfo

# Third-Party Libraries
from mongo_db_from_config import db_from_config
Expand Down Expand Up @@ -101,7 +102,7 @@ def store_data(clean_federal, agency_dict, db_config_file):
:param db_config_file: The name of the file where the database
configuration is stored
"""
date_today = datetime.combine(datetime.now(timezone.utc), time.min)
date_today = datetime.combine(datetime.now(ZoneInfo("UTC")), time.min)
db = db_from_config(db_config_file) # set up database connection
f = open(TRUSTYMAIL_RESULTS_FILE)
csv_f = csv.DictReader(f)
Expand Down
2 changes: 1 addition & 1 deletion src/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.3.5"
__version__ = "1.3.6"

0 comments on commit 1a2b6ad

Please sign in to comment.