← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:py3-input into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:py3-input into launchpad:master.

Commit message:
Fix use of raw_input

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/406310

This doesn't exist on Python 3.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-input into launchpad:master.
diff --git a/lib/lp/soyuz/scripts/ftpmasterbase.py b/lib/lp/soyuz/scripts/ftpmasterbase.py
index 3a1cfc5..a0ad758 100644
--- a/lib/lp/soyuz/scripts/ftpmasterbase.py
+++ b/lib/lp/soyuz/scripts/ftpmasterbase.py
@@ -13,6 +13,8 @@ __all__ = [
     'SoyuzScript',
     ]
 
+from six.moves import input
+
 from lp.services.scripts.base import (
     LaunchpadScript,
     LaunchpadScriptFailure,
@@ -108,7 +110,7 @@ class SoyuzScript(LaunchpadScript):
             help='Specify partner archive')
 
     def _getUserConfirmation(self, full_question=None, valid_answers=None):
-        """Use raw_input to collect user feedback.
+        """Use input to collect user feedback.
 
         Return True if the user typed the first value of the given
         'valid_answers' (defaults to 'yes') or False otherwise.
@@ -124,7 +126,7 @@ class SoyuzScript(LaunchpadScript):
 
         answer = None
         while answer not in valid_answers:
-            answer = raw_input(full_question)
+            answer = input(full_question)
 
         return answer == valid_answers[0]