Use logging.

This commit is contained in:
Jelmer Vernooij 2021-02-22 17:19:29 +00:00
parent 95f5bc2a4c
commit 7d996d007b
2 changed files with 2 additions and 10 deletions

View file

@ -42,11 +42,3 @@ def shebang_binary(p):
if args[0] in (b"/usr/bin/env", b"env"):
return os.path.basename(args[1].decode()).strip()
return os.path.basename(args[0].decode()).strip()
def note(m):
sys.stdout.write("%s\n" % m)
def warning(m):
sys.stderr.write("WARNING: %s\n" % m)

View file

@ -15,9 +15,9 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
import logging
import os
import sys
from . import note
from .buildsystem import NoBuildToolsFound
from .build import run_build
from .clean import run_clean
@ -65,7 +65,7 @@ def main():
if args.subcommand == "test":
run_test(session)
except NoBuildToolsFound:
note("No build tools found.")
logging.info("No build tools found.")
return 1
return 0