1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00
llvm-mirror/utils/llvm-build/llvmbuild/util.py
Daniel Dunbar f73f1c4499 [llvm-build] Make Py3 compatible.
llvm-svn: 188424
2013-08-14 23:15:39 +00:00

14 lines
466 B
Python

import os
import sys
def _write_message(kind, message):
program = os.path.basename(sys.argv[0])
sys.stderr.write('%s: %s: %s\n' % (program, kind, message))
note = lambda message: _write_message('note', message)
warning = lambda message: _write_message('warning', message)
error = lambda message: _write_message('error', message)
fatal = lambda message: (_write_message('fatal error', message), sys.exit(1))
__all__ = ['note', 'warning', 'error', 'fatal']