Skip to content

Commit 4e53a26

Browse files
committed
fixup! feat(Lib/os): chmod
1 parent ab906ad commit 4e53a26

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/pylib/Lib/os_impl/posix_like/chkarg.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ template gen_invalid(a, b; msg: string){.dirty.} =
5959
proc `a and b invalid`*(function_name: string, a; b): bool{.discardable.} =
6060
if `valid a`(a) and `valid b`(b):
6161
raise newException(ValueError, function_name & ": " & msg)
62-
return true
62+
return
6363
template `a and b invalid`*(a; b): untyped{.dirty.} =
6464
bind getProcName
6565
`a and b invalid`(getProcName(), a, b)

src/pylib/Lib/os_impl/posix_like/stat.nim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,8 @@ proc do_stat_impl(result: var Stat; function_name: string, path: string|int, dir
654654
doFstatat
655655
else:
656656
doFstatat
657+
if res != 0:
658+
raiseExcWithPath path
657659

658660
template withSt(body): stat_result{.dirty.} =
659661
bind to_result, Stat

0 commit comments

Comments
 (0)