From: Mathias Klette Date: Tue, 30 Apr 2013 17:23:11 +0000 (+0200) Subject: some beautifying X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=8683d9026d0c9ed60dcc9994420e2da53af76d68;p=profitbricks%2Fjenkins-build-scripts.git some beautifying --- diff --git a/debian_build.py b/debian_build.py index d7b7103..275a57d 100755 --- a/debian_build.py +++ b/debian_build.py @@ -2,41 +2,46 @@ # -*- coding: utf-8 -*- # -# Achtung: gewachsener code, den man mal wirklich - wenn zeit ist - aufräumenm sollte. +# Achtung: gewachsener code, den man mal wirklich - wenn zeit ist - aufraeumen sollte. # # wirklich. wirklich. wirklich. # # -# mehr kommentare wären auch gut. wirklich gut. +# mehr kommentare waeren auch gut. wirklich gut. -import os -import re -import pwd -import sys -import git -import errno +# import standards import atexit -import shutil +import datetime +import errno +import fileinput import fnmatch +import git import optparse -import datetime +import os import platform +import pwd +import re +import shutil import subprocess +import sys import time import urllib -import fileinput +from ConfigParser import SafeConfigParser +from ftplib import FTP +from glob import glob +from multiprocessing import cpu_count + +# import libs from 3rd party packages import psycopg2 -from common_code import * + +# import local modules from add_liveboot_request import add_liveboot_request -from db_add import * from cidb import * -from glob import glob -from ftplib import FTP -from lib import git_helper -from logging import Formatter +from common_code import * +from db_add import * from lib import git_buildpackage -from multiprocessing import cpu_count -from ConfigParser import SafeConfigParser +from lib import git_helper + # from common_code logger = logger_init() @@ -83,6 +88,11 @@ AUTO_CHANGELOG_JOBS = ( 'infrastructure-docs', 'storage-docs', ) +STABLE_DISTRIBUTIONS = ( + 'stable', + 'production', + 'production-proposed-updates' + ) class HudsonUrl(urllib.FancyURLopener): @@ -396,11 +406,10 @@ if __name__ == '__main__': exit_error() # enforce correct distribution in debian/changelog for master and hotfix branches - allowed_production_distros=('stable', 'stable-proposed-updates', 'production', 'production-proposed-updates') - if (GIT_BRANCH_NAME == 'master' or GIT_BRANCH_NAME.startswith('hotfix/')) and not distribution in allowed_production_distros: + if (GIT_BRANCH_NAME == 'master' or GIT_BRANCH_NAME.startswith('hotfix/')) and distribution not in STABLE_DISTRIBUTIONS: message = 'Distribution %s in debian/changelog not listed in %s' %( distribution, - allowed_production_distros + STABLE_DISTRIBUTIONS, ) logger.error(message) raise Exception(message)