From: Holger Levsen Date: Wed, 2 Nov 2011 13:06:15 +0000 (+0100) Subject: make it work X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=908c4e2e4ef2b59ec02139d57400cff3a16fd01a;p=profitbricks%2Fjenkins-build-scripts.git make it work --- diff --git a/kernel_inpbuilder.py b/kernel_inpbuilder.py index fce7d1d..e82d27c 100644 --- a/kernel_inpbuilder.py +++ b/kernel_inpbuilder.py @@ -15,11 +15,6 @@ from glob import glob from logging import Formatter from ftplib import FTP from multiprocessing import cpu_count -# add current dir to python search path -cmd_folder = os.path.dirname(os.path.abspath(__file__)) -if cmd_folder not in sys.path: - sys.path.insert(0, cmd_folder) -import kernel_persistence __version__ = '0.0.2' @@ -430,6 +425,11 @@ if __name__ == '__main__': logger.debug('changing dir to %s' %(GIT_TARGET_DIR)) os.chdir(GIT_TARGET_DIR) + # add current dir to python search path + cmd_folder = os.path.join(os.path.abspath(OVERLAY_DIR), '..') + sys.path.insert(0, cmd_folder) + import kernel_persistence + if has_extra_modules(): if not install_extra_modules(): logger.error('Error during installation of extra kernel modules')