From: Holger Levsen Date: Wed, 26 Oct 2011 07:47:17 +0000 (+0200) Subject: provide proper error message in case ftp login fails X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=6c5b4a81c875735aa27e3f798961870ef5cfc815;p=profitbricks%2Fjenkins-build-scripts.git provide proper error message in case ftp login fails --- diff --git a/kernel_inpbuilder.py b/kernel_inpbuilder.py index f8b6311..e28417c 100644 --- a/kernel_inpbuilder.py +++ b/kernel_inpbuilder.py @@ -431,11 +431,16 @@ if __name__ == '__main__': if not build_kernel(kernel_flavour, REVISION, OVERLAY_DIR): exit(ERROR) else: - ftp = FTP( + try: + ftp = FTP( 'alexandria.profitbricks.localdomain', 'debian-uploader', 'vae6tooZe1ec' - ) + ) + except: + logger.error('Cannot login via ftp...') + exit(ERROR) + ftp.cwd('/srv/profitbricks-repository/incoming') logger.info('FTP Login on %s successful' %(ftp.host))