You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2021/11/10 17:30:27 UTC
[libcloud] 03/06: Fix failing test.
This is an automated email from the ASF dual-hosted git repository.
tomaz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/libcloud.git
commit 07062df83f8867e11dc73c54a1e5ed3a44115294
Author: Tomaz Muraus <to...@tomaz.me>
AuthorDate: Wed Nov 10 18:03:12 2021 +0100
Fix failing test.
---
libcloud/common/ovh.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/libcloud/common/ovh.py b/libcloud/common/ovh.py
index 15d1a1d..bfeddf4 100644
--- a/libcloud/common/ovh.py
+++ b/libcloud/common/ovh.py
@@ -226,7 +226,13 @@ def handle_and_rethrow_user_friendly_invalid_region_error(host, e):
"""
msg = str(e).lower()
- if 'nodename nor servname provided, or not known' in msg or 'getaddrinfo failed' in msg:
+ error_messages_to_throw = [
+ 'name or service not known',
+ 'nodename nor servname provided, or not known',
+ 'getaddrinfo failed',
+ ]
+
+ if any([value for value in error_messages_to_throw if value in msg]):
raise ValueError('Received "name or service not known" error '
'when sending a request. This likely '
'indicates invalid region argument was '