diff --git a/fetch.py b/fetch.py index 179e076..1712af0 100644 --- a/fetch.py +++ b/fetch.py @@ -1,5 +1,6 @@ import requests from os import path +from adg_control import ADG_DIR class DriverUrl: @@ -35,7 +36,7 @@ def get_driver_by_exact_name(name: str) -> DriverUrl: try: res = next(driver for driver in drivers if driver.name == name) except StopIteration: - raise Exception("Driver not found") + raise Exception("Driver not found", name) return res @@ -98,6 +99,8 @@ def download_driver(driver: DriverUrl, dir: str): for chunk in res.iter_content(chunk_size=128): file.write(chunk) + return file_name + def read_credentials() -> (str, str): token = "" diff --git a/parser.py b/parser.py index aafcd59..4d10b1d 100644 --- a/parser.py +++ b/parser.py @@ -116,6 +116,7 @@ class Command(): else: abs_path = cache.get(self.device) package_path = ntpath.relpath(abs_path, start=ADG_DIR) + print(abs_path, package_path) client.create_normal_resource( self.name, diff --git a/test b/test deleted file mode 100644 index fe347ce..0000000 --- a/test +++ /dev/null @@ -1,5 +0,0 @@ -newdb;name=horsedb -newsystem; -normal;name=PlateOrient 1.1;location=0;envelope=1;device=HRB.PlateOrient -hotel;name=PlateHotel 1.1;location=100;envelope=1;rows=8;storage_type=random -deadlock;name = Deadlock Resolver 1.1;location=70;envelope=1