ManifestTask: use null stdin when checking sig v2.2.0_alpha141
authorZac Medico <zmedico@gentoo.org>
Thu, 18 Oct 2012 06:37:20 +0000 (23:37 -0700)
committerZac Medico <zmedico@gentoo.org>
Thu, 18 Oct 2012 06:37:20 +0000 (23:37 -0700)
pym/portage/package/ebuild/_parallel_manifest/ManifestTask.py

index d923088f5a744d92f69c2381e43faabde8743d2b..e2d023a8cc1fa909065ae4197886d24b4e7efe8c 100644 (file)
@@ -60,10 +60,12 @@ class ManifestTask(CompositeTask):
                self._start_gpg_proc()
 
        def _check_sig_key(self):
+               null_fd = os.open('/dev/null', os.O_RDONLY)
                popen_proc = PopenProcess(proc=subprocess.Popen(
                        ["gpg", "--verify", self._manifest_path],
-                       stdout=subprocess.PIPE, stderr=subprocess.STDOUT),
+                       stdin=null_fd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT),
                        pipe_reader=PipeReader())
+               os.close(null_fd)
                popen_proc.pipe_reader.input_files = {
                        "producer" : popen_proc.proc.stdout}
                self._start_task(popen_proc, self._check_sig_key_exit)