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>
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.