add try-except to system-update for locking system
This commit is contained in:
parent
d7763f0257
commit
5af01fbf28
1 changed files with 10 additions and 6 deletions
16
blend
16
blend
|
@ -383,12 +383,16 @@ def update_blends():
|
|||
error(f'distribution {args.distro} is not supported')
|
||||
|
||||
def system_update():
|
||||
if args.noconfirm == True:
|
||||
ret = subprocess.call(['sudo', 'almost', 'run', '/usr/bin/pacman', '--noconfirm', '-Syu'])
|
||||
else:
|
||||
ret = subprocess.call(['sudo', 'almost', 'run', '/usr/bin/pacman', '-Syu'])
|
||||
subprocess.call(['sudo', 'almost', 'enter', 'ro'])
|
||||
exit(ret)
|
||||
try:
|
||||
if args.noconfirm == True:
|
||||
ret = subprocess.call(['sudo', 'almost', 'run', '/usr/bin/pacman', '--noconfirm', '-Syu'])
|
||||
else:
|
||||
ret = subprocess.call(['sudo', 'almost', 'run', '/usr/bin/pacman', '-Syu'])
|
||||
subprocess.call(['sudo', 'almost', 'enter', 'ro'])
|
||||
exit(ret)
|
||||
except:
|
||||
subprocess.call(['sudo', 'almost', 'enter', 'ro'])
|
||||
exit(1)
|
||||
|
||||
def enter_container():
|
||||
if not distrobox_check_container(args.container_name):
|
||||
|
|
Loading…
Reference in a new issue