File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -245,10 +245,10 @@ def __init__(
245245 p = DEFAULT_RESP_VERSION
246246 except ValueError :
247247 raise ConnectionError ("protocol must be an integer" )
248- finally :
248+ else :
249249 if p < 2 or p > 3 :
250250 raise ConnectionError ("protocol must be either 2 or 3" )
251- self .protocol = protocol
251+ self .protocol = p
252252
253253 def __del__ (self , _warnings : Any = warnings ):
254254 # For some reason, the individual streams don't get properly garbage
Original file line number Diff line number Diff line change @@ -881,7 +881,7 @@ def __init__(
881881 p = DEFAULT_RESP_VERSION
882882 except ValueError :
883883 raise ConnectionError ("protocol must be an integer" )
884- finally :
884+ else :
885885 if p < 2 or p > 3 :
886886 raise ConnectionError ("protocol must be either 2 or 3" )
887887 # p = DEFAULT_RESP_VERSION
You can’t perform that action at this time.
0 commit comments