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/10/25 10:47:24 UTC

[libcloud] branch trunk updated (7beffe1 -> 9ad6f42)

This is an automated email from the ASF dual-hosted git repository.

tomaz pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/libcloud.git.


    from 7beffe1  Update codecov dependency.
     new 4e2eace  Add workaround for paramiko debug logging when LIBCLOUD_DEBUG is enabled.
     new 9ad6f42  Fix formatting.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 libcloud/__init__.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

[libcloud] 02/02: Fix formatting.

Posted by to...@apache.org.
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 9ad6f42281944ffec7a3dd66393505424444e09f
Author: Tomaz Muraus <to...@tomaz.me>
AuthorDate: Mon Oct 25 12:39:47 2021 +0200

    Fix formatting.
---
 libcloud/__init__.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libcloud/__init__.py b/libcloud/__init__.py
index 4e7f5e9..80299b5 100644
--- a/libcloud/__init__.py
+++ b/libcloud/__init__.py
@@ -102,9 +102,10 @@ def _init_once():
 
         if have_paramiko and hasattr(paramiko.util, 'log_to_file'):
             import logging
-            # paramiko always tries to open file path in append mode which won't work with
-            # /dev/{stdout, stderr} so we just ignore those errors
 
+            # paramiko always tries to open file path in append mode which
+            # won't work with /dev/{stdout, stderr} so we just ignore those
+            # errors
             try:
                 paramiko.util.log_to_file(filename=path, level=logging.DEBUG)
             except OSError as e:

[libcloud] 01/02: Add workaround for paramiko debug logging when LIBCLOUD_DEBUG is enabled.

Posted by to...@apache.org.
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 4e2eaceee9d7a6051659c9320a10c241ffada1d8
Author: Tomaz Muraus <to...@tomaz.me>
AuthorDate: Mon Oct 25 12:11:29 2021 +0200

    Add workaround for paramiko debug logging when LIBCLOUD_DEBUG is
    enabled.
    
    Paramiko will always try to open file path in append mode which won't
    work with /dev/{stdout,stderr} on some distros so we simply ignore those
    errors for now.
---
 libcloud/__init__.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/libcloud/__init__.py b/libcloud/__init__.py
index f9f1710..4e7f5e9 100644
--- a/libcloud/__init__.py
+++ b/libcloud/__init__.py
@@ -102,7 +102,14 @@ def _init_once():
 
         if have_paramiko and hasattr(paramiko.util, 'log_to_file'):
             import logging
-            paramiko.util.log_to_file(filename=path, level=logging.DEBUG)
+            # paramiko always tries to open file path in append mode which won't work with
+            # /dev/{stdout, stderr} so we just ignore those errors
+
+            try:
+                paramiko.util.log_to_file(filename=path, level=logging.DEBUG)
+            except OSError as e:
+                if "illegal seek" not in str(e).lower():
+                    raise e
 
     # check for broken `yum install python-requests`
     if have_requests and requests.__version__ == '2.6.0':