Do not hold the lock while retrieving application icons (qubes.NotifyTools)
This can take quite a long time, so do not block the whole system.
This commit is contained in:
parent
df509cb780
commit
6d19a9c2cc
@ -14,6 +14,7 @@ def main():
|
|||||||
print >> sys.stderr, 'This script must be called as qrexec service!'
|
print >> sys.stderr, 'This script must be called as qrexec service!'
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
|
source_vm = None
|
||||||
qvm_collection = QubesVmCollection()
|
qvm_collection = QubesVmCollection()
|
||||||
qvm_collection.lock_db_for_writing()
|
qvm_collection.lock_db_for_writing()
|
||||||
try:
|
try:
|
||||||
@ -74,15 +75,17 @@ def main():
|
|||||||
|
|
||||||
qvm_collection.save()
|
qvm_collection.save()
|
||||||
|
|
||||||
retcode = subprocess.call(['qvm-sync-appmenus', '--force-rpc'])
|
|
||||||
if retcode == 0 and hasattr(source_vm, 'appmenus_recreate'):
|
|
||||||
# TODO: call the same for child VMs? This isn't done for Linux VMs,
|
|
||||||
# so probably should be ignored for Windows also
|
|
||||||
source_vm.appmenus_recreate()
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print >> sys.stderr, e.message
|
print >> sys.stderr, e.message
|
||||||
exit(1)
|
exit(1)
|
||||||
finally:
|
finally:
|
||||||
qvm_collection.unlock_db()
|
qvm_collection.unlock_db()
|
||||||
|
|
||||||
|
retcode = subprocess.call(['qvm-sync-appmenus', '--force-rpc'])
|
||||||
|
if retcode == 0 and hasattr(source_vm, 'appmenus_recreate'):
|
||||||
|
# TODO: call the same for child VMs? This isn't done for Linux VMs,
|
||||||
|
# so probably should be ignored for Windows also
|
||||||
|
source_vm.appmenus_recreate()
|
||||||
|
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
Loading…
Reference in New Issue
Block a user