Some more PEP

This commit is contained in:
Gormogon 2015-06-14 07:25:37 -04:00
parent db7577b9f8
commit bc66502fda
5 changed files with 58 additions and 55 deletions

View file

@ -24,12 +24,11 @@ import libcalamares
def run():
""" Remove live user from target system """
username = libcalamares.job.configuration["username"]
username = libcalamares.job.configuration[("username")]
try:
libcalamares.utils.check_chroot_call(["userdel", "-f", "-r", username])
except subprocess.CalledProcessError as e:
libcalamares.utils.debug( "Cannot remove user. " +
"userdel terminated with exit code {}.".format(e.returncode))
libcalamares.utils.debug("Cannot remove user.", "'userdel' terminated with exit code {}.".format(e.returncode))
return None