Skip to content
Snippets Groups Projects
Commit c6b75e73 authored by Antoine Beaupré's avatar Antoine Beaupré
Browse files

fix deadlock in keyring import path (closes: #770900)

turns out we were holding on to a lock, yet i do not quite understand
why. i was able to reproduce and fix the problem however, so things
should improve a little now.
parent 43b8bc41
Branches 2.0.x
Tags
No related merge requests found
...@@ -545,9 +545,12 @@ class MonkeysignScan(gtk.Window): ...@@ -545,9 +545,12 @@ class MonkeysignScan(gtk.Window):
self.msui.log(_('looking for key %s in your keyring') % self.msui.pattern) self.msui.log(_('looking for key %s in your keyring') % self.msui.pattern)
self.msui.keyring.context.set_option('export-options', 'export-minimal') self.msui.keyring.context.set_option('export-options', 'export-minimal')
if self.msui.tmpkeyring.import_data(self.msui.keyring.export_data(self.msui.pattern)): if self.msui.tmpkeyring.import_data(self.msui.keyring.export_data(self.msui.pattern)):
# XXXX: this actually hangs when signing the key, maybe because we're not in a callback? # for some reason, we were holding on to a lock already, release it
# it's the prompting that hangs, see msui.ask... gtk.gdk.threads_leave()
self.watch_out_callback(0, 0) # XXX: hack, the callback should call a cleaner function self.msui.copy_secrets()
self.msui.sign_key()
self.msui.export_key()
self.resume_capture()
return # XXX: also ugly, reindent everything instead return # XXX: also ugly, reindent everything instead
# 1.b) if allowed (@todo), from the keyservers # 1.b) if allowed (@todo), from the keyservers
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment