Catch ConnectionError instead of ConnectTimeout
On non-Windows platforms, a ConnectionError exception is raised instead of a ConnectTimeout one when the connection cannot be established (e.g. the server crashed). Since the latter is a subclass of the former, we only need to catch ConnectionError.
This commit is contained in:
parent
dc44597674
commit
6e8aeeac15
@ -223,7 +223,7 @@ def HandleServerException( display = True, truncate = False ):
|
|||||||
_LoadExtraConfFile( e.extra_conf_file )
|
_LoadExtraConfFile( e.extra_conf_file )
|
||||||
else:
|
else:
|
||||||
_IgnoreExtraConfFile( e.extra_conf_file )
|
_IgnoreExtraConfFile( e.extra_conf_file )
|
||||||
except requests.exceptions.ConnectTimeout:
|
except requests.exceptions.ConnectionError:
|
||||||
# We don't display this exception to the user since it is likely to happen
|
# We don't display this exception to the user since it is likely to happen
|
||||||
# for each subsequent request (typically if the server crashed) and we
|
# for each subsequent request (typically if the server crashed) and we
|
||||||
# don't want to spam the user with it.
|
# don't want to spam the user with it.
|
||||||
|
Loading…
Reference in New Issue
Block a user