From: Rishabh Dave Date: Fri, 22 May 2020 16:25:30 +0000 (+0530) Subject: qa/vstart_runner.py: ignores when source and destination are same X-Git-Tag: wip-pdonnell-testing-20200918.022351~1009^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=49e9faee67d7750f5bd9ba1758aee5253475fc83;p=ceph-ci.git qa/vstart_runner.py: ignores when source and destination are same 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 --- diff --git a/qa/tasks/vstart_runner.py b/qa/tasks/vstart_runner.py index 9f9f60657b2..04ed2fa4aac 100644 --- a/qa/tasks/vstart_runner.py +++ b/qa/tasks/vstart_runner.py @@ -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.