]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/vstart_runner.py: ignores when source and destination are same
authorRishabh Dave <ridave@redhat.com>
Fri, 22 May 2020 16:25:30 +0000 (21:55 +0530)
committerRishabh Dave <ridave@redhat.com>
Tue, 2 Jun 2020 11:59:19 +0000 (17:29 +0530)
put_file() in vstart_runner.py should ignore the error when source and
destination paths supplied are the same. Source and destination paths
for put_file() method represents different locations for teuthology
since source and destination are on the different machines.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
qa/tasks/vstart_runner.py

index 9f9f60657b22a50aa6022da7a85842702647edf6..04ed2fa4aacc8aba0e8992ad93fa467161fe0d37 100644 (file)
@@ -271,10 +271,9 @@ class LocalRemote(object):
         try:
             shutil.copy(src, dst)
         except exception as e:
-            if sys.version_info.major < 3 and e.message.find('are the same '
-               'file') != -1:
-                return
-            raise e
+            if sys.version_info.major < 3:
+                if 'are the same file' not in  e.message:
+                    raise e
 
     # XXX: accepts only two arugments to maintain compatibility with
     # teuthology's mkdtemp.