Expose Python3 timeout on Task.timeout and bld(rule=..., timeout=...)

This commit is contained in:
Thomas Nagy 2016-09-10 12:32:01 +02:00
parent 86e9b6b959
commit 8797425153
No known key found for this signature in database
GPG Key ID: 49B4C67C05277AAA
2 changed files with 6 additions and 0 deletions

View File

@ -229,6 +229,9 @@ class TaskBase(evil):
if not 'cwd' in kw:
kw['cwd'] = self.get_cwd()
if hasattr(self, 'timeout'):
kw['timeout'] = self.timeout
if self.env.PATH:
env = kw['env'] = dict(kw.get('env') or self.env.env or os.environ)
env['PATH'] = self.env.PATH if isinstance(self.env.PATH, str) else os.pathsep.join(self.env.PATH)

View File

@ -589,6 +589,9 @@ def process_rule(self):
if getattr(self, 'always', None):
cls.always_run = True
if getattr(self, 'timeout', None):
cls.timeout = self.timeout
for x in ('after', 'before', 'ext_in', 'ext_out'):
setattr(cls, x, getattr(self, x, []))