Revision 595d480a

b/devflow/__init__.py
44 44
branch_type = namedtuple("branch_type", ["builds_snapshot", "builds_release",
45 45
                                         "versioned", "allowed_version_re",
46 46
                                         "debian_branch"])
47
VERSION_RE = "[0-9]+\.[0-9]+(\.[0-9]+)*"
47
VERSION_RE = "[0-9]+\.[0-9]+(\.[0-9]+)*"  # pylint: disable=W1401
48
HOTFIX_RE = \
49
    "^(?P<bverstr>^%s\.[1-9][0-9]*)$" % VERSION_RE,  # pylint: disable=W1401
50

  
48 51
BRANCH_TYPES = {
49 52
    "feature": branch_type(True, False, False, "^%snext$" % VERSION_RE,
50
                          "debian-develop"),
53
                           "debian-develop"),
51 54
    "develop": branch_type(True, False, False, "^%snext$" % VERSION_RE,
52 55
                           "debian-develop"),
53 56
    "release": branch_type(True, True, True,
......
56 59
    "master": branch_type(True, True, False,
57 60
                          "^%s$" % VERSION_RE, "debian"),
58 61
    "hotfix": branch_type(True, True, True,
59
                          "^(?P<bverstr>^%s\.[1-9][0-9]*)$" % VERSION_RE,
62
                          HOTFIX_RE,
60 63
                          "debian")}
61 64
BASE_VERSION_FILE = "version"
b/devflow/autopkg.py
133 133
    parser.add_option("--dist",
134 134
                      dest="dist",
135 135
                      default=None,
136
                      help="Force distribution in Debian changelog"),
136
                      help="Force distribution in Debian changelog")
137 137
    parser.add_option("-S", "--source-only",
138 138
                      dest="source_only",
139 139
                      default=False,
b/devflow/utils.py
230 230

  
231 231

  
232 232
def get_distribution_codename():
233
    output = sh.lsb_release("-c")
233
    output = sh.lsb_release("-c")  # pylint: disable=E1101
234 234
    _, codename = output.split("\t")
235 235
    codename = codename.strip()
236 236
    return codename
b/devflow/versioning.py
51 51
from devflow import utils
52 52

  
53 53

  
54
DEFAULT_VERSION_FILE =\
55
"""__version__ = "%(DEVFLOW_VERSION)s"
54
DEFAULT_VERSION_FILE = """
55
__version__ = "%(DEVFLOW_VERSION)s"
56 56
__version_vcs_info__ = {
57 57
    'branch': '%(DEVFLOW_BRANCH)s',
58 58
    'revid': '%(DEVFLOW_REVISION_ID)s',
......
227 227
                         "'release'" % mode)
228 228
    snap = (mode == "snapshot")
229 229

  
230
    if ((snap and not btype.builds_snapshot) or
231
        (not snap and not btype.builds_release)):  # nopep8
230
    if (snap and not btype.builds_snapshot) or\
231
       (not snap and not btype.builds_release):  # nopep8
232 232
        raise ValueError("Invalid mode '%s' in branch type '%s'" %
233 233
                         (mode, btypestr))
234 234

  
......
365 365
    b = get_base_version(v)
366 366
    mode = utils.get_build_mode()
367 367
    version = python_version(b, v, mode)
368
    debian_version = debian_version_from_python_version(version)
368
    debian_version_ = debian_version_from_python_version(version)
369 369
    env = {"DEVFLOW_VERSION": version,
370
           "DEVFLOW_DEBIAN_VERSION": debian_version,
370
           "DEVFLOW_DEBIAN_VERSION": debian_version_,
371 371
           "DEVFLOW_BRANCH": v.branch,
372 372
           "DEVFLOW_REVISION_ID": v.revid,
373 373
           "DEVFLOW_REVISION_NUMBER": v.revno,

Also available in: Unified diff