Skip to content

Commit 07f1619

Browse files
glaukiol1sbinet
andcommitted
Update os/os.module.go
Co-authored-by: Sebastien Binet <[email protected]>
1 parent 84fbc10 commit 07f1619

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

os/os.module.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -243,12 +243,8 @@ func system(self py.Object, args py.Tuple) (py.Object, error) {
243243
if len(args) != 1 {
244244
return nil, py.ExceptionNewf(py.TypeError, "missing one required argument: 'command:str'")
245245
}
246-
var cargs []string
247-
_carg, ok := args[0].(py.String)
248-
if !ok {
249-
return nil, py.ExceptionNewf(py.TypeError, "str expected (pos 1), not"+args[0].Type().Name)
250-
}
251-
carg := strings.ReplaceAll(string(_carg), "'", "\"")
246+
arg, ok := args[0].(py.String)
247+
if !ok { ... }
252248

253249
var command *exec.Cmd
254250
if runtime.GOOS != "windows" {

0 commit comments

Comments
 (0)