Commit 3fa87614 authored by Daniel Schreiber's avatar Daniel Schreiber

fix python3 issues

parent 2c3421ff
Pipeline #28832 failed with stage
in 16 seconds
......@@ -17,5 +17,5 @@ class Command(BaseCommand):
def handle(self, *args, **options):
path = options["csv"]
date_format = options["date"]
with open(path, "r") as csv:
with open(path, "rb") as csv:
sync_from_csv_data(csv, date_format)
......@@ -19,8 +19,7 @@ def sync_from_csv_data(file_obj, date_format):
eppn_dict = {}
for line in file_obj:
line.strip()
eppn, d = line.strip().split(",")
eppn, d = line.decode("utf-8").strip().split(",")
exp_date = timezone.make_aware(datetime.strptime(d, date_format))
eppn_dict[eppn] = exp_date
# iterate over all local resources
......
......@@ -13,5 +13,5 @@ setenv =
DJANGO_SETTINGS_MODULE=frms.test_settings
commands =
coverage run manage.py test
coverage run manage.py test api webtrigger
coverage report
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment