Skip to content
Snippets Groups Projects
Commit 58d5fa2e authored by Jeremy M Fee's avatar Jeremy M Fee
Browse files

Merge branch 'Update-make_cal' into 'master'

Update urllib2 to urllib

See merge request !44
parents 92ad7b88 a436ee3c
No related branches found
No related tags found
2 merge requests!146Release CMO metadata to production,!44Update urllib2 to urllib
Pipeline #24929 passed
......@@ -11,7 +11,7 @@ import itertools
import json
import os
import sys
import urllib2
import urllib.request
############################################################################
......@@ -54,7 +54,7 @@ url = (
try:
print(f"Loading data from web service\n\t{url}", file=sys.stderr)
response = urllib2.urlopen(
response = urllib.request.urlopen(
url,
# allow environment certificate bundle override
cafile=os.environ.get("SSL_CERT_FILE"),
......@@ -125,7 +125,7 @@ calfile.append("")
filename = FILENAME_FORMAT.format(OBSERVATORY=OBSERVATORY, YEAR=YEAR)
print("Writing cal file to {}".format(filename), file=sys.stderr)
with open(filename, "wb", -1) as f:
f.write(os.linesep.join(calfile))
f.write(os.linesep.join(calfile).encode())
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment