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')
|
error(f'distribution {args.distro} is not supported')
|
||||||
|
|
||||||
def system_update():
|
def system_update():
|
||||||
if args.noconfirm == True:
|
try:
|
||||||
ret = subprocess.call(['sudo', 'almost', 'run', '/usr/bin/pacman', '--noconfirm', '-Syu'])
|
if args.noconfirm == True:
|
||||||
else:
|
ret = subprocess.call(['sudo', 'almost', 'run', '/usr/bin/pacman', '--noconfirm', '-Syu'])
|
||||||
ret = subprocess.call(['sudo', 'almost', 'run', '/usr/bin/pacman', '-Syu'])
|
else:
|
||||||
subprocess.call(['sudo', 'almost', 'enter', 'ro'])
|
ret = subprocess.call(['sudo', 'almost', 'run', '/usr/bin/pacman', '-Syu'])
|
||||||
exit(ret)
|
subprocess.call(['sudo', 'almost', 'enter', 'ro'])
|
||||||
|
exit(ret)
|
||||||
|
except:
|
||||||
|
subprocess.call(['sudo', 'almost', 'enter', 'ro'])
|
||||||
|
exit(1)
|
||||||
|
|
||||||
def enter_container():
|
def enter_container():
|
||||||
if not distrobox_check_container(args.container_name):
|
if not distrobox_check_container(args.container_name):
|
||||||
|
|
Loading…
Reference in a new issue