diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2016-09-01 23:12:06 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-09-01 23:12:06 +0300 |
commit | cdf0c4f1a945f1262ae604047fd240b25cf44050 (patch) | |
tree | efb861fa017c1f8663b75570fe61fa644c2bd3d0 /mesonbuild/mintro.py | |
parent | 389259c229b30d38ec9de503dff965973b24ee26 (diff) | |
parent | 859c5e28df90851838aacc4b9ad49d3630e4992a (diff) | |
download | meson-cdf0c4f1a945f1262ae604047fd240b25cf44050.zip meson-cdf0c4f1a945f1262ae604047fd240b25cf44050.tar.gz meson-cdf0c4f1a945f1262ae604047fd240b25cf44050.tar.bz2 |
Merge branch 'QuLogic-context-managers'
Diffstat (limited to 'mesonbuild/mintro.py')
-rw-r--r-- | mesonbuild/mintro.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/mesonbuild/mintro.py b/mesonbuild/mintro.py index 629b0fc..2086c37 100644 --- a/mesonbuild/mintro.py +++ b/mesonbuild/mintro.py @@ -177,10 +177,14 @@ def run(args): buildfile = os.path.join(bdir, 'meson-private/build.dat') testfile = os.path.join(bdir, 'meson-private/meson_test_setup.dat') benchmarkfile = os.path.join(bdir, 'meson-private/meson_benchmark_setup.dat') - coredata = pickle.load(open(corefile, 'rb')) - builddata = pickle.load(open(buildfile, 'rb')) - testdata = pickle.load(open(testfile, 'rb')) - benchmarkdata = pickle.load(open(benchmarkfile, 'rb')) + with open(corefile, 'rb') as f: + coredata = pickle.load(f) + with open(buildfile, 'rb') as f: + builddata = pickle.load(f) + with open(testfile, 'rb') as f: + testdata = pickle.load(f) + with open(benchmarkfile, 'rb') as f: + benchmarkdata = pickle.load(f) if options.list_targets: list_targets(coredata, builddata) elif options.target_files is not None: |