`try_skip` method can now take an extra name.

Useful if different "skip_files" are stored in the same directory.
This commit is contained in:
Matthieu Gautier 2018-03-20 17:56:14 +01:00
parent c04bfaba14
commit b2243e438b
1 changed files with 4 additions and 2 deletions

View File

@ -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()