Skip to content

Commit ac0d459

Browse files
committed
fix(py): OSError([arg]): works
1 parent 4b14bbf commit ac0d459

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/pylib/pyerrors/oserr/init.nim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ template gen(name, typ, thirdDefVal){.dirty.} =
66
proc name*(myerrno: cint, strerr: string,
77
filename = thirdDefVal, winerror: cint = 0, filename2 = ""): ref PyOSError =
88
OSError_new[types.typ](true, myerrno, strerr, filename, winerror, filename2)
9+
proc name*(strerr: string = ""): ref PyOSError =
10+
new result
11+
result.strerror = strerr
912
1013
template gen(typ, thirdDefVal){.dirty.} =
1114
gen(`new typ`, typ, thirdDefVal)

0 commit comments

Comments
 (0)