mirror of https://gitlab.com/ita1024/waf.git
Expose Python3 timeout on Task.timeout and bld(rule=..., timeout=...)
This commit is contained in:
parent
86e9b6b959
commit
8797425153
|
@ -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)
|
||||
|
|
|
@ -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, []))
|
||||
|
||||
|
|
Loading…
Reference in New Issue