s4:libcli/smb2: remove unused variable
[Samba/gebeck_regimport.git] / buildtools / wafadmin / 3rdparty / paranoid.py
blobead64ea5c3aa80b0c04001aeca1adc8e49151382
1 #!/usr/bin/env python
2 # encoding: utf-8
3 # ita 2010
5 import Logs, Utils, Build, Task
7 def say(txt):
8 Logs.warn("^o^: %s" % txt)
10 try:
11 ret = Utils.cmd_output('which cowsay 2> /dev/null').strip()
12 except Exception, e:
13 pass
14 else:
15 def say(txt):
16 f = Utils.cmd_output([ret, txt])
17 Utils.pprint('PINK', f)
19 say('you make the errors, we detect them')
21 def check_task_classes(self):
22 for x in Task.TaskBase.classes:
23 if isinstance(x, Task.Task):
24 if not getattr(cls, 'ext_in', None) or getattr(cls, 'before', None):
25 say('class %s has no precedence constraints (ext_in/before)')
26 if not getattr(cls, 'ext_out', None) or getattr(cls, 'after', None):
27 say('class %s has no precedence constraints (ext_out/after)')
29 comp = Build.BuildContext.compile
30 def compile(self):
31 if not getattr(self, 'magic', None):
32 check_task_classes(self)
33 return comp(self)
34 Build.BuildContext.compile = compile