flake8: apply E1 rules

This commit is contained in:
Yuming Zhu 2020-02-26 02:08:41 +08:00
parent 450f9249cd
commit ce1f9928af
30 changed files with 958 additions and 958 deletions

View file

@ -25,20 +25,20 @@ def handle_runroot(options, session, args):
parser.add_option("-p", "--package", action="append", default=[], help=_("make sure this package is in the chroot"))
parser.add_option("-m", "--mount", action="append", default=[], help=_("mount this directory read-write in the chroot"))
parser.add_option("--skip-setarch", action="store_true", default=False,
help=_("bypass normal setarch in the chroot"))
help=_("bypass normal setarch in the chroot"))
parser.add_option("-w", "--weight", type='int', help=_("set task weight"))
parser.add_option("--channel-override", help=_("use a non-standard channel"))
parser.add_option("--task-id", action="store_true", default=False,
help=_("Print the ID of the runroot task"))
help=_("Print the ID of the runroot task"))
parser.add_option("--use-shell", action="store_true", default=False,
help=_("Run command through a shell, otherwise uses exec"))
help=_("Run command through a shell, otherwise uses exec"))
parser.add_option("--new-chroot", action="store_true", default=None,
help=_("Run command with the --new-chroot (systemd-nspawn) option to mock"))
help=_("Run command with the --new-chroot (systemd-nspawn) option to mock"))
parser.add_option("--old-chroot", action="store_false", default=None, dest='new_chroot',
help=_("Run command with the --old-chroot (systemd-nspawn) option to mock"))
help=_("Run command with the --old-chroot (systemd-nspawn) option to mock"))
parser.add_option("--repo-id", type="int", help=_("ID of the repo to use"))
parser.add_option("--nowait", action="store_false", dest="wait",
default=True, help=_("Do not wait on task"))
default=True, help=_("Do not wait on task"))
parser.add_option("--watch", action="store_true", help=_("Watch task instead of printing runroot.log"))
parser.add_option("--quiet", action="store_true", default=options.quiet,
help=_("Do not print the task information"))

View file

@ -14,13 +14,13 @@ def handle_save_failed_tree(options, session, args):
usage += _("\n(Specify the --help global option for a list of other help options)")
parser = OptionParser(usage=usage)
parser.add_option("-f", "--full", action="store_true", default=False,
help=_("Download whole tree, if not specified, only builddir will be downloaded"))
help=_("Download whole tree, if not specified, only builddir will be downloaded"))
parser.add_option("-t", "--task", action="store_const", dest="mode",
const="task", default="task",
help=_("Treat ID as a task ID (the default)"))
const="task", default="task",
help=_("Treat ID as a task ID (the default)"))
parser.add_option("-r", "--buildroot", action="store_const", dest="mode",
const="buildroot",
help=_("Treat ID as a buildroot ID"))
const="buildroot",
help=_("Treat ID as a buildroot ID"))
parser.add_option("--quiet", action="store_true", default=options.quiet,
help=_("Do not print the task information"))
parser.add_option("--nowait", action="store_true",
@ -63,7 +63,7 @@ def handle_save_failed_tree(options, session, args):
if not opts.quiet:
print(_("Created task %s for buildroot %s") % (task_id, br_id))
print("Task info: %s/taskinfo?taskID=%s"
% (options.weburl, task_id))
% (options.weburl, task_id))
if opts.nowait:
return