Skip to content

Commit ef01fce

Browse files
author
Vitaliy Zakaznikov
committed
Fixing path_type to raise FileNotFoundError if path does not exist.
1 parent eb94066 commit ef01fce

File tree

1 file changed

+2
-1
lines changed
  • testflows/github/hetzner/runners

1 file changed

+2
-1
lines changed

testflows/github/hetzner/runners/args.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ def path_type(v, check_exists=True):
8787
try:
8888
v = os.path.abspath(os.path.expanduser(v))
8989
if check_exists:
90-
os.path.exists(v)
90+
if not os.path.exists(v):
91+
raise FileNotFoundError(f"path not found '{v}'")
9192
except Exception as e:
9293
raise ArgumentTypeError(str(e))
9394
return v

0 commit comments

Comments
 (0)