libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r1486170 - /libcloud/branches/0.12.x/libcloud/__init__.py
Date Fri, 24 May 2013 19:00:31 GMT
Author: tomaz
Date: Fri May 24 19:00:31 2013
New Revision: 1486170

URL: http://svn.apache.org/r1486170
Log:
Only import libcloud.utils.debug module if enable_requests_stats environment
variable is set.

Modified:
    libcloud/branches/0.12.x/libcloud/__init__.py

Modified: libcloud/branches/0.12.x/libcloud/__init__.py
URL: http://svn.apache.org/viewvc/libcloud/branches/0.12.x/libcloud/__init__.py?rev=1486170&r1=1486169&r2=1486170&view=diff
==============================================================================
--- libcloud/branches/0.12.x/libcloud/__init__.py (original)
+++ libcloud/branches/0.12.x/libcloud/__init__.py Fri May 24 19:00:31 2013
@@ -32,9 +32,6 @@ except ImportError:
     have_paramiko = False
 
 
-from libcloud.utils.debug import print_request_statistics
-
-
 def enable_debug(fo):
     """
     Enable library wide debugging to a file-like object.
@@ -55,6 +52,8 @@ def enable_debug(fo):
     enable_requests_stats = os.getenv('LIBCLOUD_REQUESTS_STATS')
 
     if enable_requests_stats:
+        from libcloud.utils.debug import print_request_statistics
+
         LoggingHTTPSConnection.enable_requests_stats = True
         LoggingHTTPConnection.enable_requests_stats = True
         atexit.register(print_request_statistics, fo=fo,



Mime
View raw message