File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -207,18 +207,20 @@ func loadValue(src Object, data interface{}) error {
207
207
}
208
208
209
209
// Println prints the provided strings to gpython's stdout.
210
- func Println (self Object , args ... string ) ( int , error ) {
210
+ func Println (self Object , args ... string ) error {
211
211
sysModule , err := self .(* Module ).Context .GetModule ("sys" )
212
212
if err != nil {
213
- return 1 , err
213
+ return err
214
214
}
215
215
stdout := sysModule .Globals ["stdout" ]
216
216
write , err := GetAttrString (stdout , "write" )
217
217
if err != nil {
218
- return 1 , err
218
+ return err
219
219
}
220
220
call , ok := write .(I__call__ )
221
- if ! ok { ... }
221
+ if ! ok {
222
+ return AssertionError
223
+ }
222
224
for _ , v := range args {
223
225
if ! strings .Contains (v , "\n " ) {
224
226
v += " "
You can’t perform that action at this time.
0 commit comments