Python-style: pep8 fixes

main
Adriaan de Groot 7 years ago
parent 22c0ee5dbb
commit c694792e4f

@ -39,9 +39,11 @@ _ = gettext.translation("python",
libcalamares.globalstorage.gettext_languages(),
fallback=True).gettext
def pretty_name():
return _("Dummy python job.")
def run():
"""Dummy python job."""
os.system("/bin/sh -c \"touch ~/calamares-dummypython\"")
@ -81,15 +83,15 @@ def run():
sleep(1)
try:
l = list(libcalamares.job.configuration["a_list"])
configlist = list(libcalamares.job.configuration["a_list"])
except KeyError:
l = ["no list"]
configlist = ["no list"]
c = 1
for k in l:
for k in configlist:
libcalamares.utils.debug(_("Dummy python step {}").format(str(k)))
sleep(1)
libcalamares.job.setprogress( c * 1.0 / len(l) )
libcalamares.job.setprogress(c * 1.0 / len(configlist))
c += 1
sleep(3)

@ -30,9 +30,11 @@ _ = gettext.translation("python",
libcalamares.globalstorage.gettext_languages(),
fallback=True).gettext
def pretty_name():
return _("Generate machine-id.")
def run():
"""
Generate machine-id using dbus and systemd.

Loading…
Cancel
Save