mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-26 01:40:08 +01:00
tools/libinput-replay: use list comprehension instead of append
And remove the unnecessary del processes, we're in a block so processes ceases to exist there anyway. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1102>
This commit is contained in:
parent
193aacf61a
commit
117d91b93f
1 changed files with 4 additions and 6 deletions
|
|
@ -278,10 +278,10 @@ def loop(args, recording):
|
|||
input("Hit enter to start replaying")
|
||||
|
||||
try:
|
||||
processes = []
|
||||
for d in devices:
|
||||
p = multiprocessing.Process(target=wrap, args=(replay, d, args.verbose))
|
||||
processes.append(p)
|
||||
processes = [
|
||||
multiprocessing.Process(target=wrap, args=(replay, d, args.verbose))
|
||||
for d in devices
|
||||
]
|
||||
|
||||
for p in processes:
|
||||
p.start()
|
||||
|
|
@ -289,8 +289,6 @@ def loop(args, recording):
|
|||
for p in processes:
|
||||
p.join()
|
||||
|
||||
del processes
|
||||
|
||||
if args.once:
|
||||
break
|
||||
except KeyboardInterrupt:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue