Fix bugs imported by Xiaochuan xs
This commit is contained in:
@@ -87,15 +87,14 @@ def get_vm_file(env, config: Dict[str, Any]) -> Union[Optional[str], List[Option
|
|||||||
paths: List[str] = [config["path"]]
|
paths: List[str] = [config["path"]]
|
||||||
dests: List[str] = [config["dest"]]
|
dests: List[str] = [config["dest"]]
|
||||||
print(config)
|
print(config)
|
||||||
if "time_suffix" in config.keys() and config["time_suffix"]:
|
|
||||||
if "time_format" in config.keys():
|
if "time_suffix" in config.keys() and config["time_suffix"]:
|
||||||
time_format = config["time_format"]
|
if "time_format" in config.keys():
|
||||||
# Insert time before . in file type suffix
|
time_format = config["time_format"]
|
||||||
paths = [p.split(".")[0] + datetime.now().strftime(time_format) + "." + p.split(".")[1] if "." in p else p for p in paths]
|
# Insert time before . in file type suffix
|
||||||
dests = [d.split(".")[0] + datetime.now().strftime(time_format) + "." + d.split(".")[1] if "." in d else d for d in dests]
|
paths = [p.split(".")[0] + datetime.now().strftime(time_format) + "." + p.split(".")[1] if "." in p else p for p in paths]
|
||||||
else:
|
dests = [d.split(".")[0] + datetime.now().strftime(time_format) + "." + d.split(".")[1] if "." in d else d for d in dests]
|
||||||
paths: List[str] = config["path"]
|
|
||||||
dests: List[str] = config["dest"]
|
|
||||||
print(paths)
|
print(paths)
|
||||||
print(dests)
|
print(dests)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user