mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-19 04:58:09 +00:00
Address typing issues hidden by memoization.caching (#322)
This commit is contained in:
@ -41,7 +41,7 @@ def get_vm(name: str) -> Optional[VirtualMachine]:
|
||||
|
||||
def create_vm(
|
||||
name: str,
|
||||
location: str,
|
||||
location: Region,
|
||||
vm_sku: str,
|
||||
image: str,
|
||||
password: str,
|
||||
|
@ -47,6 +47,8 @@ class Task(BASE_TASK, ORMMixin):
|
||||
) -> Union["Task", Error]:
|
||||
if config.vm:
|
||||
os = get_os(config.vm.region, config.vm.image)
|
||||
if isinstance(os, Error):
|
||||
return os
|
||||
elif config.pool:
|
||||
pool = Pool.get_by_name(config.pool.pool_name)
|
||||
if isinstance(pool, Error):
|
||||
|
Reference in New Issue
Block a user