summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Client/Frame.py
diff options
context:
space:
mode:
authorJason Kincl <kincljc@ornl.gov>2012-11-19 10:37:34 -0500
committerJason Kincl <kincljc@ornl.gov>2012-11-19 10:37:34 -0500
commit894299b01b6138c54a99fd41f166554d175d6106 (patch)
tree88e11cb8c49d3f933cf5f622a93dfa123922960f /src/lib/Bcfg2/Client/Frame.py
parentde0ae51b6dc635a3acd2491d4ca3fd021aa55873 (diff)
parentf4da37aa0a360add3f5c40f37cd3cc010ef8788f (diff)
downloadbcfg2-894299b01b6138c54a99fd41f166554d175d6106.tar.gz
bcfg2-894299b01b6138c54a99fd41f166554d175d6106.tar.bz2
bcfg2-894299b01b6138c54a99fd41f166554d175d6106.zip
Merge remote branch 'upstream/master' into jasons-hacking
Diffstat (limited to 'src/lib/Bcfg2/Client/Frame.py')
-rw-r--r--src/lib/Bcfg2/Client/Frame.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Client/Frame.py b/src/lib/Bcfg2/Client/Frame.py
index 64460ea66..53180ab68 100644
--- a/src/lib/Bcfg2/Client/Frame.py
+++ b/src/lib/Bcfg2/Client/Frame.py
@@ -1,8 +1,10 @@
""" Frame is the Client Framework that verifies and installs entries,
and generates statistics. """
+import os
import sys
import time
+import select
import fnmatch
import logging
import Bcfg2.Client.Tools
@@ -160,6 +162,9 @@ class Frame(object):
iprompt = entry.get('qtext')
else:
iprompt = prompt % (entry.tag, entry.get('name'))
+ # flush input buffer
+ while len(select.select([sys.stdin.fileno()], [], [], 0.0)[0]) > 0:
+ os.read(sys.stdin.fileno(), 4096)
try:
ans = input(iprompt.encode(sys.stdout.encoding, 'replace'))
if ans in ['y', 'Y']: