Skip to content

Commit ce1fee3

Browse files
glaukiol1sbinet
andcommitted
Update os/os.module.go
Co-authored-by: Sebastien Binet <[email protected]>
1 parent 958dc60 commit ce1fee3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

os/os.module.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,8 @@ func _exit(self py.Object, args py.Tuple) (py.Object, error) { // can never retu
223223
if len(args) == 0 {
224224
os.Exit(0)
225225
}
226-
if len(args) == 1 && objectIsInt(args[0]) {
226+
arg, ok := args[0].(py.Int)
227+
if !ok { ... handle error ... }
227228
_ec, err := py.GetInt(args[0])
228229
if err != nil {
229230
os.Exit(1)

0 commit comments

Comments
 (0)