[PEP8] fix several modules
This commit is contained in:
parent
09f11a4091
commit
a1e1c66f1d
@ -82,8 +82,10 @@ class OperationTracker:
|
|||||||
|
|
||||||
libcalamares.job.setprogress(self.progress)
|
libcalamares.job.setprogress(self.progress)
|
||||||
|
|
||||||
|
|
||||||
ON_POSIX = 'posix' in sys.builtin_module_names
|
ON_POSIX = 'posix' in sys.builtin_module_names
|
||||||
|
|
||||||
|
|
||||||
class PacmanController:
|
class PacmanController:
|
||||||
def __init__(self, root):
|
def __init__(self, root):
|
||||||
self.__root = root
|
self.__root = root
|
||||||
@ -146,8 +148,13 @@ class PacmanController:
|
|||||||
self.tracker.downloaded += 1
|
self.tracker.downloaded += 1
|
||||||
phase = 1
|
phase = 1
|
||||||
debug("Downloading: {}".format(dl[0]))
|
debug("Downloading: {}".format(dl[0]))
|
||||||
debug("Downloaded packages: {}".format(self.tracker.downloaded))
|
debug("Downloaded packages: {}".format(
|
||||||
self.tracker.send_progress(self.tracker.downloaded, phase)
|
self.tracker.downloaded
|
||||||
|
))
|
||||||
|
self.tracker.send_progress(
|
||||||
|
self.tracker.downloaded,
|
||||||
|
phase
|
||||||
|
)
|
||||||
|
|
||||||
last = dl
|
last = dl
|
||||||
elif inst:
|
elif inst:
|
||||||
@ -262,7 +269,6 @@ class ChrootController:
|
|||||||
cal_umask = os.umask(0)
|
cal_umask = os.umask(0)
|
||||||
self.make_dirs()
|
self.make_dirs()
|
||||||
path = join(self.root, "run")
|
path = join(self.root, "run")
|
||||||
#debug("Fix permissions: {}".format(path))
|
|
||||||
os.chmod(path, 0o755)
|
os.chmod(path, 0o755)
|
||||||
os.umask(cal_umask)
|
os.umask(cal_umask)
|
||||||
self.copy_file('etc/pacman-mirrors.conf')
|
self.copy_file('etc/pacman-mirrors.conf')
|
||||||
@ -277,6 +283,7 @@ class ChrootController:
|
|||||||
|
|
||||||
return pacman.run()
|
return pacman.run()
|
||||||
|
|
||||||
|
|
||||||
def run():
|
def run():
|
||||||
"""
|
"""
|
||||||
Create chroot dirs and install pacman,
|
Create chroot dirs and install pacman,
|
||||||
|
@ -112,8 +112,8 @@ def run():
|
|||||||
|
|
||||||
if ec != 0:
|
if ec != 0:
|
||||||
return "Cannot enable systemd service {}".format(dm), \
|
return "Cannot enable systemd service {}".format(dm), \
|
||||||
"systemctl enable call in chroot returned error code " \
|
"systemctl enable call in chroot returned error " \
|
||||||
"{}".format(ec)
|
"code {}".format(ec)
|
||||||
else:
|
else:
|
||||||
libcalamares.utils.debug(
|
libcalamares.utils.debug(
|
||||||
"Cannot enable systemd service {}".format(dm)
|
"Cannot enable systemd service {}".format(dm)
|
||||||
|
@ -79,7 +79,12 @@ class ServicesController:
|
|||||||
def update(self, action, state):
|
def update(self, action, state):
|
||||||
for svc in self.services[state]:
|
for svc in self.services[state]:
|
||||||
if exists(self.root + "/etc/init.d/" + svc["name"]):
|
if exists(self.root + "/etc/init.d/" + svc["name"]):
|
||||||
target_env_call(["rc-update", action, svc["name"], svc["runlevel"]])
|
target_env_call([
|
||||||
|
"rc-update",
|
||||||
|
action,
|
||||||
|
svc["name"],
|
||||||
|
svc["runlevel"]
|
||||||
|
])
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self.configure()
|
self.configure()
|
||||||
|
Loading…
Reference in New Issue
Block a user