summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Admin/Pull.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/Server/Admin/Pull.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/Server/Admin/Pull.py')
-rw-r--r--src/lib/Bcfg2/Server/Admin/Pull.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Server/Admin/Pull.py b/src/lib/Bcfg2/Server/Admin/Pull.py
index e41652205..130e85b67 100644
--- a/src/lib/Bcfg2/Server/Admin/Pull.py
+++ b/src/lib/Bcfg2/Server/Admin/Pull.py
@@ -1,8 +1,10 @@
""" Retrieves entries from clients and integrates the information into
the repository """
-import getopt
+import os
import sys
+import getopt
+import select
import Bcfg2.Server.Admin
from Bcfg2.Compat import input # pylint: disable=W0622
@@ -99,6 +101,10 @@ class Pull(Bcfg2.Server.Admin.MetadataCore):
else:
print(" => host entry: %s" % (choice.hostname))
+ # flush input buffer
+ while len(select.select([sys.stdin.fileno()], [], [],
+ 0.0)[0]) > 0:
+ os.read(sys.stdin.fileno(), 4096)
ans = input("Use this entry? [yN]: ") in ['y', 'Y']
if ans:
return choice