Include scripts in formatting

This commit is contained in:
Patrick Smith
2019-01-15 10:56:28 -05:00
parent c9639435aa
commit 1cd015a862
4 changed files with 31 additions and 19 deletions

View File

@@ -4,7 +4,8 @@ import csv
# Add root project dir to the python path
import os
import sys
parent_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
parent_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
sys.path.append(parent_dir)
from atst.app import make_app, make_config
@@ -16,9 +17,10 @@ def get_pe_numbers(url):
t = response.read().decode("utf-8")
return list(csv.reader(t.split("\r\n")))
if __name__ == "__main__":
config = make_config()
url = config['PE_NUMBER_CSV_URL']
url = config["PE_NUMBER_CSV_URL"]
print("Fetching PE numbers from {}".format(url))
pe_numbers = get_pe_numbers(url)