libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [1/2] libcloud git commit: Move the import inside the if to avoid side affects inside setup.py.
Date Fri, 25 Sep 2015 12:25:53 GMT
Repository: libcloud
Updated Branches:
  refs/heads/trunk e136292a9 -> 73842ad81


Move the import inside the if to avoid side affects inside setup.py.


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

Branch: refs/heads/trunk
Commit: bac1780024d827ae75ee98b556ffb791e3e0a363
Parents: e136292
Author: Tomaz Muraus <tomaz@apache.org>
Authored: Fri Sep 25 14:16:23 2015 +0200
Committer: Tomaz Muraus <tomaz@apache.org>
Committed: Fri Sep 25 14:16:23 2015 +0200

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


http://git-wip-us.apache.org/repos/asf/libcloud/blob/bac17800/libcloud/__init__.py
----------------------------------------------------------------------
diff --git a/libcloud/__init__.py b/libcloud/__init__.py
index 9ebb78f..0cae941 100644
--- a/libcloud/__init__.py
+++ b/libcloud/__init__.py
@@ -55,15 +55,16 @@ def _init_once():
     This checks for the LIBCLOUD_DEBUG environment variable, which if it exists
     is where we will log debug information about the provider transports.
     """
-    from libcloud.utils.py3 import PY3
-
     path = os.getenv('LIBCLOUD_DEBUG')
     if path:
         mode = 'a'
 
         # Special case for /dev/stderr and /dev/stdout on Python 3.
+        from libcloud.utils.py3 import PY3
+
         # Opening those files in append mode will throw "illegal seek"
         # exception there.
+        # Late import to avoid setup.py related side affects
         if path in ['/dev/stderr', '/dev/stdout'] and PY3:
             mode = 'w'
 


Mime
View raw message