ver Jan10thv2
a new example config for Thunderbird fixed several bugs
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from typing import Dict
|
||||
from typing import Optional
|
||||
|
||||
import os
|
||||
import requests
|
||||
@@ -27,7 +28,7 @@ def get_cloud_file(env, config: Dict[str, str]) -> str:
|
||||
return _path
|
||||
|
||||
|
||||
def get_vm_file(env, config: Dict[str, str]) -> str:
|
||||
def get_vm_file(env, config: Dict[str, str]) -> Optional[str]:
|
||||
"""
|
||||
Config:
|
||||
path (str): absolute path on the VM to fetch
|
||||
@@ -37,6 +38,8 @@ def get_vm_file(env, config: Dict[str, str]) -> str:
|
||||
_path = os.path.join(env.cache_dir, config["dest"])
|
||||
|
||||
file = env.controller.get_file(config["path"])
|
||||
if file is None:
|
||||
return None
|
||||
with open(_path, "wb") as f:
|
||||
f.write(file)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user