From 86b47250c61bd373a3d28dd05a4a231564b1bfef Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Thu, 20 Aug 2020 10:13:43 -0400 Subject: simplify shutil usage by invoking copy2 where appropriate It's equivalent to copyfile + copystat with the same arguments. --- mesonbuild/scripts/yelphelper.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'mesonbuild/scripts/yelphelper.py') diff --git a/mesonbuild/scripts/yelphelper.py b/mesonbuild/scripts/yelphelper.py index 95c8c9c..6bf0673 100644 --- a/mesonbuild/scripts/yelphelper.py +++ b/mesonbuild/scripts/yelphelper.py @@ -68,8 +68,7 @@ def install_help(srcdir, blddir, sources, media, langs, install_dir, destdir, pr infile = os.path.join(srcdir if lang == 'C' else blddir, lang, source) outfile = os.path.join(indir, source) mlog.log('Installing %s to %s' % (infile, outfile)) - shutil.copyfile(infile, outfile) - shutil.copystat(infile, outfile) + shutil.copy2(infile, outfile) for m in media: infile = os.path.join(srcdir, lang, m) outfile = os.path.join(indir, m) -- cgit v1.1