mirror of
https://gitlab.freedesktop.org/upower/power-profiles-daemon.git
synced 2026-05-08 03:08:09 +02:00
main: Fix Python traceback when Ctrl+C'ing a launched app
This commit is contained in:
parent
c19bede0d7
commit
19275d52fa
1 changed files with 5 additions and 2 deletions
|
|
@ -189,8 +189,11 @@ def _launch(args, profile, appid, reason):
|
|||
|
||||
# print (f'Got {cookie} for {profile} hold')
|
||||
with subprocess.Popen(args) as launched_app:
|
||||
launched_app.wait()
|
||||
ret = launched_app.returncode
|
||||
try:
|
||||
launched_app.wait()
|
||||
ret = launched_app.returncode
|
||||
except KeyboardInterrupt:
|
||||
ret = launched_app.returncode
|
||||
proxy.ReleaseProfile('(u)', cookie)
|
||||
|
||||
return ret
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue