libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r1454783 - in /libcloud/trunk/libcloud: compute/ssh.py test/compute/test_ssh_client.py
Date Sun, 10 Mar 2013 04:32:29 GMT
Author: tomaz
Date: Sun Mar 10 04:32:29 2013
New Revision: 1454783

URL: http://svn.apache.org/r1454783
Log:
Remove changes introduced as part of LIBCLOUD-278.

Those changes introduces a regression in client.run method which would only make
it work if you passed in a relative or absolute path to the shell script to this
method.

Modified:
    libcloud/trunk/libcloud/compute/ssh.py
    libcloud/trunk/libcloud/test/compute/test_ssh_client.py

Modified: libcloud/trunk/libcloud/compute/ssh.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/ssh.py?rev=1454783&r1=1454782&r2=1454783&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/ssh.py (original)
+++ libcloud/trunk/libcloud/compute/ssh.py Sun Mar 10 04:32:29 2013
@@ -191,19 +191,6 @@ class ParamikoSSHClient(BaseSSHClient):
         sftp.close()
 
     def run(self, cmd):
-        if cmd[0] != '/':
-            # If 'cmd' based on relative path,
-            # set the absoute path joining the HOME path
-            sftp = self.client.open_sftp()
-            # Chdir to its own directory is mandatory because otherwise
-            # the 'getcwd()' method returns None
-            sftp.chdir('.')
-            cwd = sftp.getcwd()
-            sftp.close()
-
-            # Join the command to the current path
-            cmd = pjoin(cwd, cmd)
-
         # based on exec_command()
         bufsize = -1
         t = self.client.get_transport()

Modified: libcloud/trunk/libcloud/test/compute/test_ssh_client.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/test/compute/test_ssh_client.py?rev=1454783&r1=1454782&r2=1454783&view=diff
==============================================================================
--- libcloud/trunk/libcloud/test/compute/test_ssh_client.py (original)
+++ libcloud/trunk/libcloud/test/compute/test_ssh_client.py Sun Mar 10 04:32:29 2013
@@ -117,7 +117,7 @@ class ParamikoSSHClientTests(unittest.Te
 
         mock.close()
 
-    def test_run_script_with_relative_path(self):
+    def _disabled_test_run_script_with_relative_path(self):
         """
         Execute script with relative path.
         """



Mime
View raw message