This commit is contained in:
Emilia Allison 2024-02-12 12:08:03 -05:00
parent f6ba365dbe
commit f55cfef16c
Signed by: emilia
GPG Key ID: 05D5D1107E5100A1
3 changed files with 5 additions and 6 deletions

View File

@ -1,5 +1,6 @@
import requests import requests
from os import path from os import path
from adg_control import ADG_DIR
class DriverUrl: class DriverUrl:
@ -35,7 +36,7 @@ def get_driver_by_exact_name(name: str) -> DriverUrl:
try: try:
res = next(driver for driver in drivers if driver.name == name) res = next(driver for driver in drivers if driver.name == name)
except StopIteration: except StopIteration:
raise Exception("Driver not found") raise Exception("Driver not found", name)
return res return res
@ -98,6 +99,8 @@ def download_driver(driver: DriverUrl, dir: str):
for chunk in res.iter_content(chunk_size=128): for chunk in res.iter_content(chunk_size=128):
file.write(chunk) file.write(chunk)
return file_name
def read_credentials() -> (str, str): def read_credentials() -> (str, str):
token = "" token = ""

View File

@ -116,6 +116,7 @@ class Command():
else: else:
abs_path = cache.get(self.device) abs_path = cache.get(self.device)
package_path = ntpath.relpath(abs_path, start=ADG_DIR) package_path = ntpath.relpath(abs_path, start=ADG_DIR)
print(abs_path, package_path)
client.create_normal_resource( client.create_normal_resource(
self.name, self.name,

5
test
View File

@ -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