fix problem with wokwi files not being fetched. Add the wokwi truthtable testing that got lost in merge

This commit is contained in:
Matt Venn
2023-05-25 14:57:16 +02:00
parent 02e5cc1ae2
commit bd524505bf
3 changed files with 45 additions and 9 deletions
+4 -2
View File
@@ -3,7 +3,9 @@ from urllib.parse import urlparse
import logging
import requests
import os
import zipfile, io
import zipfile
import io
import errno
def unique(duplist):
@@ -21,7 +23,7 @@ def fetch_file(url, filename):
r = requests.get(url)
if r.status_code != 200:
logging.warning("couldn't download {}".format(url))
exit(1)
raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), filename)
with open(filename, 'wb') as fh:
logging.info("written to {}".format(filename))