Readability refactoring

This commit is contained in:
flyingscorpio@arch-desktop 2020-04-22 21:33:47 +02:00
parent 316ae63232
commit 2a72401456

View file

@ -120,13 +120,9 @@ class Installer:
ui.fatal("Operating System not understood.") ui.fatal("Operating System not understood.")
return return
install = subprocess.run( install = subprocess.run(command, check=False, shell=True,
command, stdout=subprocess.DEVNULL,
check=False, stderr=subprocess.DEVNULL)
shell=True,
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
)
if install.returncode != 0: if install.returncode != 0:
ui.info(ui.cross) ui.info(ui.cross)
@ -140,11 +136,8 @@ class Installer:
for failed in failed_installs: for failed in failed_installs:
ui.info(" ", failed) ui.info(" ", failed)
ui.info( ui.info(ui.yellow, "Are the packages really meant for {} systems?"
ui.yellow, .format(self.operating_system))
"Are the packages really meant for {} systems?"
.format(self.operating_system)
)
def do_run(self, command: str, condition: str = "true") -> None: def do_run(self, command: str, condition: str = "true") -> None:
"""Run a command.""" """Run a command."""