diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2022-11-18 13:25:12 -0800 |
|---|---|---|
| committer | Eli Schwartz <eschwartz@archlinux.org> | 2023-05-31 17:20:44 -0400 |
| commit | ada2a976f003f505181d2f252ef907f8caa345e0 (patch) | |
| tree | 547aac75202aa63aec5688e5c064f80ca43cf557 /unittests/baseplatformtests.py | |
| parent | 1e79553c36bf6473a58559254dc25fc550dfca99 (diff) | |
| download | meson-ada2a976f003f505181d2f252ef907f8caa345e0.tar.gz | |
mlog: use a hidden class for state
This is a pretty common pattern in python (the standard library uses it
a ton): A class is created, with a single private instance in the
module, and then it's methods are exposed as public API. This removes
the need for the global statement, and is generally a little easier to
reason about thanks to encapsulation.
Diffstat (limited to 'unittests/baseplatformtests.py')
| -rw-r--r-- | unittests/baseplatformtests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/unittests/baseplatformtests.py b/unittests/baseplatformtests.py index 251c15d35..489e5c428 100644 --- a/unittests/baseplatformtests.py +++ b/unittests/baseplatformtests.py @@ -229,8 +229,8 @@ class BasePlatformTests(TestCase): finally: # Close log file to satisfy Windows file locking mesonbuild.mlog.shutdown() - mesonbuild.mlog.log_dir = None - mesonbuild.mlog.log_file = None + mesonbuild.mlog._logger.log_dir = None + mesonbuild.mlog._logger.log_file = None if 'MESON_SKIP_TEST' in out: raise SkipTest('Project requested skipping.') |
