From b2243e438b952d1559c0d9d53128d154bb70cdaa Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Tue, 20 Mar 2018 17:56:14 +0100 Subject: [PATCH] `try_skip` method can now take an extra name. Useful if different "skip_files" are stored in the same directory. --- utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/utils.py b/utils.py index f4ace50..e5e9718 100644 --- a/utils.py +++ b/utils.py @@ -137,8 +137,10 @@ class Context: self.force_native_build = force_native_build self.autoskip_file = None - def try_skip(self, path): - self.autoskip_file = pj(path, ".{}_ok".format(self.command_name)) + def try_skip(self, path, extra_name=""): + if extra_name: + extra_name = "_{}".format(extra_name) + self.autoskip_file = pj(path, ".{}{}_ok".format(self.command_name, extra_name)) if os.path.exists(self.autoskip_file): raise SkipCommand()