third_party:waf: update to upstream 2.0.4 release
[nivanova/samba-autobuild/.git] / third_party / waf / waflib / Errors.py
index c9f42621104fed57f898da4107880a8eeb4e84ed..c38a557128efbaf73b6ffe1f91cc453471f430ed 100644 (file)
@@ -4,7 +4,7 @@
 
 #!/usr/bin/env python
 # encoding: utf-8
-# Thomas Nagy, 2010-2016 (ita)
+# Thomas Nagy, 2010-2018 (ita)
 
 """
 Exceptions used in the Waf code
@@ -21,6 +21,7 @@ class WafError(Exception):
                :param ex: exception causing this error (optional)
                :type ex: exception
                """
+               Exception.__init__(self)
                self.msg = msg
                assert not isinstance(msg, Exception)
 
@@ -53,7 +54,8 @@ class BuildError(WafError):
                lst = ['Build failed']
                for tsk in self.tasks:
                        txt = tsk.format_error()
-                       if txt: lst.append(txt)
+                       if txt:
+                               lst.append(txt)
                return '\n'.join(lst)
 
 class ConfigurationError(WafError):
@@ -67,3 +69,4 @@ class TaskRescan(WafError):
 class TaskNotReady(WafError):
        """Task-specific exception type signalling that task signatures cannot be computed"""
        pass
+