Skip to content

Commit 2fc494e

Browse files
committed
return error from Close, even if Close doesn't return errors
1 parent 24e39a3 commit 2fc494e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

py/file.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,7 @@ func (o *File) M__enter__() (Object, error) {
163163
}
164164

165165
func (o *File) M__exit__(exc_type, exc_value, traceback Object) (Object, error) {
166-
o.Close()
167-
return None, nil
166+
return o.Close()
168167
}
169168

170169
func OpenFile(filename, mode string, buffering int) (Object, error) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy