/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/ui/text.py

  • Committer: Vincent Ladeuil
  • Date: 2011-05-31 21:08:52 UTC
  • mfrom: (5743.12.19 config-options)
  • mto: This revision was merged to the branch mainline in revision 5945.
  • Revision ID: v.ladeuil+lp@free.fr-20110531210852-0uyfsjkws5zbfs8m
Merge trunk resolving conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
                password = password[:-1]
115
115
        return password
116
116
 
117
 
    def get_password(self, prompt='', **kwargs):
 
117
    def get_password(self, prompt=u'', **kwargs):
118
118
        """Prompt the user for a password.
119
119
 
120
120
        :param prompt: The prompt to present the user
198
198
        :param kwargs: Dictionary of arguments to insert into the prompt,
199
199
            to allow UIs to reformat the prompt.
200
200
        """
 
201
        if type(prompt) != unicode:
 
202
            raise ValueError("prompt %r not a unicode string" % prompt)
201
203
        if kwargs:
202
204
            # See <https://launchpad.net/bugs/365891>
203
205
            prompt = prompt % kwargs