9991ea
From 57bf3ea34f2b727ffe1977de1010fdf0f62c354a Mon Sep 17 00:00:00 2001
9991ea
From: Jan Cholasta <jcholast@redhat.com>
9991ea
Date: Tue, 10 Dec 2013 16:32:08 +0100
9991ea
Subject: [PATCH] Prevent garbage from readline on standard output of
9991ea
 dogtag-ipa-retrieve-agent.
9991ea
9991ea
https://fedorahosted.org/freeipa/ticket/4064
9991ea
---
9991ea
 install/certmonger/dogtag-ipa-retrieve-agent-submit | 4 ++++
9991ea
 1 file changed, 4 insertions(+)
9991ea
9991ea
diff --git a/install/certmonger/dogtag-ipa-retrieve-agent-submit b/install/certmonger/dogtag-ipa-retrieve-agent-submit
9991ea
index 3781fc5d01da12ce2dc01e17fc60143e82fbedc6..70cbd82d7d5cc392a2877e7478f459cc8b4a570f 100644
9991ea
--- a/install/certmonger/dogtag-ipa-retrieve-agent-submit
9991ea
+++ b/install/certmonger/dogtag-ipa-retrieve-agent-submit
9991ea
@@ -23,6 +23,10 @@
9991ea
 # retrieve the updated certificate from IPA.
9991ea
 
9991ea
 import os
9991ea
+# Prevent garbage from readline on standard output
9991ea
+# (see https://fedorahosted.org/freeipa/ticket/4064)
9991ea
+if not os.isatty(1):
9991ea
+    os.environ['TERM'] = 'dumb'
9991ea
 import sys
9991ea
 import shutil
9991ea
 import tempfile
9991ea
-- 
9991ea
1.8.4.2
9991ea