mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
use FileNotFoundError insted of "File path not found"
This commit is contained in:
parent
b1008af696
commit
f767bf2330
@ -75,7 +75,7 @@ class PromptsFromFileInvocation(BaseInvocation):
|
|||||||
@validator("file_path")
|
@validator("file_path")
|
||||||
def file_path_exists(cls, v):
|
def file_path_exists(cls, v):
|
||||||
if not exists(v):
|
if not exists(v):
|
||||||
raise ValueError("file path not found")
|
raise ValueError(FileNotFoundError)
|
||||||
return v
|
return v
|
||||||
|
|
||||||
def promptsFromFile(self, file_path: str, pre_prompt: str, post_prompt: str, start_line: int, max_prompts: int):
|
def promptsFromFile(self, file_path: str, pre_prompt: str, post_prompt: str, start_line: int, max_prompts: int):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user