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

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: 1b217077c515efc5afac4f73c77f6759aeec5582
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:py3-input
Merge into: launchpad:master
Diff against target: 30 lines (+4/-2)
1 file modified
lib/lp/soyuz/scripts/ftpmasterbase.py (+4/-2)
Reviewer Review Type Date Requested Status
Cristian Gonzalez (community) Approve
Review via email: mp+406310@code.launchpad.net

Commit message

Fix use of raw_input

Description of the change

This doesn't exist on Python 3.

To post a comment you must log in.
Revision history for this message
Cristian Gonzalez (cristiangsp) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/soyuz/scripts/ftpmasterbase.py b/lib/lp/soyuz/scripts/ftpmasterbase.py
2index 3a1cfc5..a0ad758 100644
3--- a/lib/lp/soyuz/scripts/ftpmasterbase.py
4+++ b/lib/lp/soyuz/scripts/ftpmasterbase.py
5@@ -13,6 +13,8 @@ __all__ = [
6 'SoyuzScript',
7 ]
8
9+from six.moves import input
10+
11 from lp.services.scripts.base import (
12 LaunchpadScript,
13 LaunchpadScriptFailure,
14@@ -108,7 +110,7 @@ class SoyuzScript(LaunchpadScript):
15 help='Specify partner archive')
16
17 def _getUserConfirmation(self, full_question=None, valid_answers=None):
18- """Use raw_input to collect user feedback.
19+ """Use input to collect user feedback.
20
21 Return True if the user typed the first value of the given
22 'valid_answers' (defaults to 'yes') or False otherwise.
23@@ -124,7 +126,7 @@ class SoyuzScript(LaunchpadScript):
24
25 answer = None
26 while answer not in valid_answers:
27- answer = raw_input(full_question)
28+ answer = input(full_question)
29
30 return answer == valid_answers[0]
31

Subscribers

People subscribed via source and target branches

to status/vote changes: