From: Holger Levsen Date: Fri, 9 Mar 2012 15:25:32 +0000 (+0100) Subject: log less loud X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=cb94d2cae9cd5cc67d1d7be38ce63c574d34cab1;p=profitbricks%2Fjenkins-build-scripts.git log less loud --- diff --git a/debian_build.py b/debian_build.py index 0776303..817c9f6 100755 --- a/debian_build.py +++ b/debian_build.py @@ -96,19 +96,9 @@ logger.setLevel(logging.DEBUG) class HudsonUrl(urllib.FancyURLopener): pass -def logger_loud_error(msg): - print '##########################################################################' - print '##########################################################################' - print '### ERROR ### ERROR ### ERROR ### ERROR ### ERROR ### ERROR ###' - print '##########################################################################' - print '##########################################################################' +def logger_error(msg): print msg logger.error(msg) - print '##########################################################################' - print '##########################################################################' - print '### ERROR ### ERROR ### ERROR ### ERROR ### ERROR ### ERROR ###' - print '##########################################################################' - print '##########################################################################' def read_file(path): try: @@ -239,7 +229,7 @@ if __name__ == '__main__': #if git_helper.git_clone_remote_repository(GIT_REPO_PATH, GIT_TARGET_DIR): # logger.info('git clone was successfull') #else: - # logger_loud_error('git clone was not successfull') + # logger_error('git clone was not successfull') # exit_error() #atexit.register(remove_git_target_workspace) @@ -254,7 +244,7 @@ if __name__ == '__main__': GIT_UPSTREAM_BRANCH ) else: - logger_loud_error('Could not determine GIT_UPSTREAM_BRANCH') + logger_error('Could not determine GIT_UPSTREAM_BRANCH') exit_error() repo = git.repo.Repo() @@ -287,7 +277,7 @@ if __name__ == '__main__': ) ret = parse_changelog.wait() if ret: - logger_loud_error('%s was not successfull, return code was %s ' % (' '.join(cmd), ret)) + logger_error('%s was not successfull, return code was %s ' % (' '.join(cmd), ret)) raise Exception( '%s was not successfull, return code was %s ' % (' '.join(cmd), ret) ) @@ -307,7 +297,7 @@ if __name__ == '__main__': ) ret = grep_dctrl.wait() if ret: - logger_loud_error('%s was not successfull, return code was %s ' % (' '.join(cmd), ret)) + logger_error('%s was not successfull, return code was %s ' % (' '.join(cmd), ret)) raise Exception( '%s was not successfull, return code was %s ' % (' '.join(cmd), ret) ) @@ -326,7 +316,7 @@ if __name__ == '__main__': logger.info('Package distribution is %s' % (distribution)) if (options.distribution in ('stable', 'stable-proposed-updates', 'production', 'production-proposed-updates') and not distribution in ('stable', 'stable-proposed-updates', 'production', 'production-proposed-updates')): - logger_loud_error('Distribution %s in debian/changelog did not match branch %s' % (distribution, options.distribution)) + logger_error('Distribution %s in debian/changelog did not match branch %s' % (distribution, options.distribution)) raise Exception( 'Distribution %s in debian/changelog did not match branch %s' % (distribution, options.distribution) ) @@ -435,7 +425,7 @@ if __name__ == '__main__': subprocess.check_call(cmd) # now handle gpb result if ret: - logger_loud_error( + logger_error( 'git-buildpackage returned non-zero. exitcode was: %s' % ret ) exit_error()