From 49e9faee67d7750f5bd9ba1758aee5253475fc83 Mon Sep 17 00:00:00 2001 From: Rishabh Dave Date: Fri, 22 May 2020 21:55:30 +0530 Subject: [PATCH] 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 --- qa/tasks/vstart_runner.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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. -- 2.39.5