diff --git a/mock/py/mock.py b/mock/py/mock.py index 8d154f120..01008406f 100755 --- a/mock/py/mock.py +++ b/mock/py/mock.py @@ -61,23 +61,13 @@ # pylint: disable=import-error from functools import partial + +# our imports from mockbuild import config from mockbuild import util -from mockbuild.constants import MOCKCONFDIR, PYTHONDIR, VERSION +from mockbuild.constants import MOCKCONFDIR, VERSION from mockbuild.file_downloader import FileDownloader from mockbuild.mounts import BindMountPoint, FileSystemMountPoint - -# import all mockbuild.* modules after this. -sys.path.insert(0, PYTHONDIR) - -# set up basic logging until config file can be read -FORMAT = "%(levelname)s: %(message)s" -logging.basicConfig(format=FORMAT, level=logging.WARNING) -log = logging.getLogger() - -# our imports -# pylint: disable=wrong-import-position - import mockbuild.backend from mockbuild.backend import Commands from mockbuild.buildroot import Buildroot @@ -89,6 +79,12 @@ import mockbuild.uid from mockbuild.scrub_all import scrub_all_chroots +# set up basic logging until config file can be read +FORMAT = "%(levelname)s: %(message)s" +logging.basicConfig(format=FORMAT, level=logging.WARNING) +log = logging.getLogger() + + signal_names = {1: "SIGHUP", 13: "SIGPIPE", 15: "SIGTERM" diff --git a/mock/pylintrc b/mock/pylintrc index d4601412d..2ef8a288a 100644 --- a/mock/pylintrc +++ b/mock/pylintrc @@ -133,7 +133,7 @@ max-public-methods=20 max-line-length=120 # Maximum number of lines in a module -max-module-lines=1000 +max-module-lines=2000 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 # tab).