From 0d7baf2b756537c0c4c49cba029a99554e318dcb Mon Sep 17 00:00:00 2001 From: MrS0m30n3 Date: Mon, 15 Jan 2018 01:25:28 +0200 Subject: [PATCH] setup.py: Replace print statements with log functions --- setup.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 009e7fb..ac68b9e 100644 --- a/setup.py +++ b/setup.py @@ -51,7 +51,7 @@ Notes: """ -from distutils import cmd +from distutils import cmd, log from distutils.core import setup from distutils.command.build import build @@ -132,10 +132,10 @@ class BuildTranslations(cmd.Command): mo_file = po_file.replace(".po", ".mo") try: - print("building MO file for '{}'").format(po_file) + log.info("building MO file for '{}'".format(po_file)) call([self.exec_name, "-o", mo_file, po_file]) except OSError: - print("could not locate file '{}', exiting...".format(self.exec_name)) + log.error("could not locate file '{}', exiting...".format(self.exec_name)) sys.exit(1) @@ -172,12 +172,12 @@ class Build(build): data = input_file.readlines() if data is None: - print("building with updates disabled failed!") + log.error("building with updates disabled failed!") sys.exit(1) for index, line in enumerate(data): if "'disable_update': False" in line: - print("disabling updates") + log.info("disabling updates") data[index] = line.replace("False", "True") break