# -*- 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()
'infrastructure-docs',
'storage-docs',
)
+STABLE_DISTRIBUTIONS = (
+ 'stable',
+ 'production',
+ 'production-proposed-updates'
+ )
class HudsonUrl(urllib.FancyURLopener):
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)