diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2020-08-20 10:13:43 -0400 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-08-20 23:47:54 +0300 |
commit | 86b47250c61bd373a3d28dd05a4a231564b1bfef (patch) | |
tree | 634a8a9ace6752a0e5190229a9f309c1361c8d45 /mesonbuild/scripts/gettext.py | |
parent | 1c403e20e70ac523216a31f977901fb815166b7a (diff) | |
download | meson-86b47250c61bd373a3d28dd05a4a231564b1bfef.zip meson-86b47250c61bd373a3d28dd05a4a231564b1bfef.tar.gz meson-86b47250c61bd373a3d28dd05a4a231564b1bfef.tar.bz2 |
simplify shutil usage by invoking copy2 where appropriate
It's equivalent to copyfile + copystat with the same arguments.
Diffstat (limited to 'mesonbuild/scripts/gettext.py')
-rw-r--r-- | mesonbuild/scripts/gettext.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mesonbuild/scripts/gettext.py b/mesonbuild/scripts/gettext.py index f5c0421..7042863 100644 --- a/mesonbuild/scripts/gettext.py +++ b/mesonbuild/scripts/gettext.py @@ -83,8 +83,7 @@ def do_install(src_sub, bld_sub, dest, pkgname, langs): pkgname + '.mo') tempfile = outfile + '.tmp' os.makedirs(os.path.dirname(outfile), exist_ok=True) - shutil.copyfile(srcfile, tempfile) - shutil.copystat(srcfile, tempfile) + shutil.copy2(srcfile, tempfile) os.replace(tempfile, outfile) print('Installing %s to %s' % (srcfile, outfile)) return 0 |