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
4
blend
4
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():
|
||||||
|
try:
|
||||||
if args.noconfirm == True:
|
if args.noconfirm == True:
|
||||||
ret = subprocess.call(['sudo', 'almost', 'run', '/usr/bin/pacman', '--noconfirm', '-Syu'])
|
ret = subprocess.call(['sudo', 'almost', 'run', '/usr/bin/pacman', '--noconfirm', '-Syu'])
|
||||||
else:
|
else:
|
||||||
ret = subprocess.call(['sudo', 'almost', 'run', '/usr/bin/pacman', '-Syu'])
|
ret = subprocess.call(['sudo', 'almost', 'run', '/usr/bin/pacman', '-Syu'])
|
||||||
subprocess.call(['sudo', 'almost', 'enter', 'ro'])
|
subprocess.call(['sudo', 'almost', 'enter', 'ro'])
|
||||||
exit(ret)
|
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