diff --git a/src/common/GnuPG.py b/src/common/GnuPG.py
index a19f7546b1bf50dc8a2d5b6841ce3dfba5aa6d7e..f6d8e7e2bc32208695367abcc9538fdec507b3f7 100644
--- a/src/common/GnuPG.py
+++ b/src/common/GnuPG.py
@@ -194,6 +194,9 @@ if gajim.HAVE_GPG:
 			output = proc.handles['stdout'].read()
 			proc.handles['stdout'].close()
 
+			try: proc.wait()
+			except IOError: pass
+
 			keys = {}
 			lines = output.split('\n')
 			for line in lines:
@@ -234,4 +237,4 @@ if gajim.HAVE_GPG:
 			out = out + "-----END PGP %s-----\n" % type_
 			return out
 
-# vim: se ts=3:
+# vim: set ts=3: