@@ -28,7 +28,7 @@ from shlex import quote
2828import xml .etree .ElementTree as ET
2929
3030# Constants
31- VERSION = "0.1.6 "
31+ VERSION = "0.1.7 "
3232ZYPPER_PID_FILE = "/run/zypp.pid"
3333VALID_CMD = ["dup" , "run" , "rollback" ]
3434VALID_OPT = ["--reboot" , "--apply" , "--shell" , "--continue" , "--no-verify" , \
@@ -307,7 +307,7 @@ programs = ["zypper", "snapper", "btrfs", "echo", "ps", "sed", "awk", "bash", "s
307307 "env" , "chroot" , "mount" , "umount" , "rmdir" , "findmnt" , "systemd-nspawn" , \
308308 "systemctl" , "machinectl" , "systemd-analyze" ]
309309for program in programs :
310- if not shell_exec (f"command -v { program } " ):
310+ if not shell_exec (f"command -v { program } " )[ 0 ] :
311311 logging .error (f"Bailing out, missing required dependecy { program !r} in PATH ({ os .environ .get ('PATH' )} ) " \
312312 f"for user { os .environ .get ('USER' )!r} . The following programs " \
313313 f"are required for atomic-update to function: { ', ' .join (programs )} "
@@ -325,7 +325,7 @@ if os.path.isfile(ZYPPER_PID_FILE):
325325 except ValueError :
326326 pid = None
327327 if pid :
328- pid_program = shell_exec (f"ps -p { pid } | sed '1d' | awk '{{print $4}}'" )
328+ pid_program = shell_exec (f"ps -p { pid } | sed '1d' | awk '{{print $4}}'" )[ 0 ]
329329 if pid_program :
330330 msg = f"zypper is already invoked by the application with pid { pid } ({ pid_program } ).\n " \
331331 "Close this application before trying again."
0 commit comments