Commit 7383c8c8 authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

Pep8 fixes

parent ca01e50e
......@@ -151,7 +151,7 @@ def main():
config_file = options.config_file or os.path.join(toplevel, "autopkg.conf")
packages = get_packages_to_build(config_file)
if packages:
print_green("Will build the following packages:\n" + \
print_green("Will build the following packages:\n"
"\n".join(packages))
else:
raise RuntimeError("Configuration file is empty."
......@@ -208,16 +208,16 @@ def main():
cd(repo_dir)
python_version = versioning.get_python_version()
debian_version = versioning.\
debian_version_from_python_version(python_version)
debian_version_from_python_version(python_version)
print_green("The new debian version will be: '%s'" % debian_version)
# Update changelog
dch = git_dch("--debian-branch=%s" % debian_branch,
"--git-author",
"--ignore-regex=\".*\"",
"--multimaint-merge",
"--since=HEAD",
"--new-version=%s" % debian_version)
"--git-author",
"--ignore-regex=\".*\"",
"--multimaint-merge",
"--since=HEAD",
"--new-version=%s" % debian_version)
print_green("Successfully ran '%s'" % " ".join(dch.cmd))
if mode == "release":
......@@ -258,7 +258,7 @@ def main():
if not options.build_dir:
build_dir = create_temp_directory("df-build")
print_green("Created directory '%s' to store the .deb files." %
build_dir)
build_dir)
cd(repo_dir)
os.system("git-buildpackage --git-export-dir=%s --git-upstream-branch=%s"
......
......@@ -319,9 +319,9 @@ def python_version(base_version, vcs_info, mode):
snap = (mode == "snapshot")
if ((snap and not btype.builds_snapshot) or
(not snap and not btype.builds_release)):
raise ValueError("Invalid mode '%s' in branch type '%s'" %
(mode, btypestr))
(not snap and not btype.builds_release)): # nopep8
raise ValueError("Invalid mode '%s' in branch type '%s'" %
(mode, btypestr))
if snap:
v = "%s_%d_%s" % (base_version, vcs_info.revno, vcs_info.revid)
......@@ -448,14 +448,13 @@ def update_version(module, name="version", root="."):
b = base_version(v)
mode = build_mode()
version = python_version(b, v, mode)
content = """
__version__ = "%(version)s"
content = """__version__ = "%(version)s"
__version_info__ = %(version_info)s
__version_vcs_info__ = %(vcs_info)s
__version_user_info__ = "%(user_info)s"
""" % dict(version=version, version_info=version.split("."),
vcs_info=pprint.PrettyPrinter().pformat(dict(v._asdict())),
user_info=user_info())
vcs_info=pprint.PrettyPrinter().pformat(dict(v._asdict())),
user_info=user_info())
module_file = file(module_filename, "w+")
module_file.write(content)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment