aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mlog.py
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2018-05-13 10:36:58 -0400
committerXavier Claessens <xavier.claessens@collabora.com>2018-08-22 15:15:54 -0400
commitbef8187e43204cb26b4549ffc1d2bdd3351ac957 (patch)
tree361d2dd605a1888e4af716fd120ad94ea9b4f4d0 /mesonbuild/mlog.py
parent1e6d72eb5a7082a47e609985d416085161f89440 (diff)
downloadmeson-bef8187e43204cb26b4549ffc1d2bdd3351ac957.zip
meson-bef8187e43204cb26b4549ffc1d2bdd3351ac957.tar.gz
meson-bef8187e43204cb26b4549ffc1d2bdd3351ac957.tar.bz2
mlog.shutdown(): Return the log file path or None if not initialized
Diffstat (limited to 'mesonbuild/mlog.py')
-rw-r--r--mesonbuild/mlog.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/mlog.py b/mesonbuild/mlog.py
index 1654824..b8d3ccc 100644
--- a/mesonbuild/mlog.py
+++ b/mesonbuild/mlog.py
@@ -59,9 +59,12 @@ def set_timestamp_start(start):
def shutdown():
global log_file
if log_file is not None:
+ path = log_file.name
exception_around_goer = log_file
log_file = None
exception_around_goer.close()
+ return path
+ return None
class AnsiDecorator:
plain_code = "\033[0m"