libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From quent...@apache.org
Subject [2/4] libcloud git commit: Fix paramiko tests on Python 2.7
Date Sat, 16 Dec 2017 14:29:13 GMT
Fix paramiko tests on Python 2.7


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/987a22d7
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/987a22d7
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/987a22d7

Branch: refs/heads/trunk
Commit: 987a22d7c384c8fff4a0a02ec4d1f6f93d043e7d
Parents: ab84b03
Author: Quentin Pradet <quentinp@apache.org>
Authored: Sat Dec 16 10:50:45 2017 +0400
Committer: Quentin Pradet <quentinp@apache.org>
Committed: Sat Dec 16 18:28:00 2017 +0400

----------------------------------------------------------------------
 libcloud/__init__.py       | 4 +++-
 libcloud/test/test_init.py | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/987a22d7/libcloud/__init__.py
----------------------------------------------------------------------
diff --git a/libcloud/__init__.py b/libcloud/__init__.py
index 1d53281..f59a8a1 100644
--- a/libcloud/__init__.py
+++ b/libcloud/__init__.py
@@ -18,6 +18,7 @@ libcloud provides a unified interface to the cloud computing resources.
 
 :var __version__: Current version of libcloud
 """
+import logging
 import os
 import codecs
 
@@ -78,6 +79,7 @@ def _init_once():
         enable_debug(fo)
 
         if have_paramiko:
-            paramiko.common.logging.basicConfig(level=paramiko.common.DEBUG)
+            paramiko_logger = paramiko.util.logging.getLogger()
+            paramiko_logger.setLevel(logging.DEBUG)
 
 _init_once()

http://git-wip-us.apache.org/repos/asf/libcloud/blob/987a22d7/libcloud/test/test_init.py
----------------------------------------------------------------------
diff --git a/libcloud/test/test_init.py b/libcloud/test/test_init.py
index d512d3b..d088cb9 100644
--- a/libcloud/test/test_init.py
+++ b/libcloud/test/test_init.py
@@ -41,7 +41,7 @@ class TestUtils(unittest.TestCase):
         if have_paramiko:
             logger = paramiko.util.logging.getLogger()
             paramiko_log_level = logger.getEffectiveLevel()
-            self.assertEqual(paramiko_log_level, logging.WARNING)
+            self.assertEqual(paramiko_log_level, logging.NOTSET)
 
         # Enable debug mode
         os.environ['LIBCLOUD_DEBUG'] = '/dev/null'


Mime
View raw message