From 64e8f2c7bf781def278332ce665215ba79827297 Mon Sep 17 00:00:00 2001 From: Philipp Ittershagen Date: Mon, 3 Apr 2017 20:58:30 +0200 Subject: Refactor duplicate code in File Increase readability using the File method self.relative_name() to factor out some of the os.path.join(...) commands. --- mesonbuild/mesonlib.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'mesonbuild/mesonlib.py') diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py index c7368d5..cf21182 100644 --- a/mesonbuild/mesonlib.py +++ b/mesonbuild/mesonlib.py @@ -123,14 +123,14 @@ class File: self.fname = fname def __str__(self): - return os.path.join(self.subdir, self.fname) + return self.relative_name() def __repr__(self): ret = '