File tree Expand file tree Collapse file tree 5 files changed +7
-8
lines changed
Expand file tree Collapse file tree 5 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 3838class GeoComReturnCode (IntEnum ):
3939 """Base class for all GeoCom return code enums."""
4040
41+ def __bool__ (self ) -> bool :
42+ return self == 0
43+
4144
4245class GeoComResponse (Generic [_P ]):
4346 """
Original file line number Diff line number Diff line change @@ -173,8 +173,7 @@ def __init__(
173173 for i in range (retry ):
174174 try :
175175 self ._conn .send ("\n " )
176- response = self .com .nullprocess ()
177- if not response .error :
176+ if self .com .nullprocess ():
178177 sleep (1 )
179178 break
180179 except Exception :
Original file line number Diff line number Diff line change @@ -179,8 +179,7 @@ def __init__(
179179 for i in range (retry ):
180180 try :
181181 self ._conn .send ("\n " )
182- response = self .com .nullprocess ()
183- if not response .error :
182+ if self .com .nullprocess ():
184183 sleep (1 )
185184 break
186185 except Exception :
Original file line number Diff line number Diff line change @@ -179,8 +179,7 @@ def __init__(
179179 for i in range (retry ):
180180 try :
181181 self ._conn .send ("\n " )
182- response = self .com .nullprocess ()
183- if not response .error :
182+ if self .com .nullprocess ():
184183 sleep (1 )
185184 break
186185 except Exception :
Original file line number Diff line number Diff line change @@ -192,8 +192,7 @@ def __init__(
192192 for i in range (retry ):
193193 try :
194194 self ._conn .send ("\n " )
195- response = self .com .nullprocess ()
196- if not response .error :
195+ if self .com .nullprocess ():
197196 sleep (1 )
198197 break
199198 except Exception :
You can’t perform that action at this time.
0 commit comments