``Errors`` is not imported. Import ``waflib.Errors`` and use ``waflib.Errors.wafError`` here.