summaryrefslogtreecommitdiff
path: root/pykolab/utils.py
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-05-05 19:31:16 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-05-05 19:31:16 (GMT)
commitcf383257f7abe863ddca8eabb20464409c7f0e53 (patch)
tree1ce054ca323e24c7406c2f544cc8a1e3b7e074bc /pykolab/utils.py
parent168171fc34e65879fd6d25a9e4795caabc0e0af8 (diff)
downloadpykolab-cf383257f7abe863ddca8eabb20464409c7f0e53.tar.gz
Correct running in unbuffered mode
Diffstat (limited to 'pykolab/utils.py')
-rw-r--r--pykolab/utils.py10
1 files changed, 0 insertions, 10 deletions
diff --git a/pykolab/utils.py b/pykolab/utils.py
index c40b252..0ba203a 100644
--- a/pykolab/utils.py
+++ b/pykolab/utils.py
@@ -35,11 +35,6 @@ def ask_question(question, default="", password=False):
Usage: pykolab.utils.ask_question("What is the server?", default="localhost")
"""
-
- # Remove any buffering that may exist
- sys.stderr = os.fdopen(sys.stderr.fileno(), 'w', 0)
- sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)
-
if password:
if default == "":
answer = getpass.getpass("%s: " % (question))
@@ -62,11 +57,6 @@ def ask_confirmation(question, default="y", all_inclusive_no=True):
and a "yes" or "no" parsing that can either require an explicit, full
"yes" or "no", or take the default or any YyNn answer.
"""
-
- # Remove any buffering that may exist
- sys.stderr = os.fdopen(sys.stderr.fileno(), 'w', 0)
- sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)
-
if default in [ "y", "Y" ]:
default_answer = True
default_no = "n"