update comment regarding prior py2 exception

This commit is contained in:
mdr0id 2020-02-09 12:38:01 -08:00
parent 5ac9cb85f3
commit fdac835b13
1 changed files with 2 additions and 1 deletions

View File

@ -113,7 +113,8 @@ class AuthServiceProxy():
# If connection was closed, try again.
# Python 3.5+ raises BrokenPipeError instead of BadStatusLine when the connection was reset.
# ConnectionResetError happens on FreeBSD with Python 3.4.
# These classes don't exist in Python 2.x, so we can't refer to them directly.
# This can be simplified now that we depend on Python 3 (previously, we could not
# refer to BrokenPipeError or ConnectionResetError which did not exist on Python 2)
if ((isinstance(e, BadStatusLine) and e.line == "''")
or e.__class__.__name__ in ('BrokenPipeError', 'ConnectionResetError')):
self.__conn.close()