File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ def __str__(self):
90
90
91
91
def close (self ):
92
92
# close named pipe
93
- if self .stream :
93
+ if self .stream is not None :
94
94
self .stream .close ()
95
95
self .stream = None
96
96
if path .exists (self ._path ):
Original file line number Diff line number Diff line change @@ -119,10 +119,10 @@ def __str__(self):
119
119
120
120
def close (self ):
121
121
# close named pipe
122
- if self .stream :
122
+ if self .stream is not None :
123
123
self .stream .close ()
124
124
self .stream = None
125
- if self ._pipe :
125
+ if self ._pipe is not None :
126
126
if win32file .CloseHandle (self ._pipe ):
127
127
raise _win_error ()
128
128
self ._pipe = None
@@ -210,7 +210,7 @@ def close(self) -> None:
210
210
be called more than once without error."""
211
211
if self .closed :
212
212
return
213
- if self .handle :
213
+ if self .handle is not None :
214
214
win32file .CloseHandle (self .handle )
215
215
self .handle = None
216
216
You can’t perform that action at this time.
0 commit comments