/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/__init__.py

  • Committer: Martin Pool
  • Date: 2009-04-24 13:30:48 UTC
  • mto: This revision was merged to the branch mainline in revision 4303.
  • Revision ID: mbp@sourcefrog.net-20090424133048-os2wkskng4ma86bm
Fix string expansion in TextUIFactory.prompt

Show diffs side-by-side

added added

removed removed

Lines of Context:
218
218
 
219
219
    def prompt(self, prompt, **kwargs):
220
220
        """Emit prompt on the CLI."""
221
 
        prompt = prompt % kwargs
 
221
        if kwargs:
 
222
            # XXX: expanding kwargs should probably be done at a higher level;
 
223
            # it doesn't seem particularly helpful here and see
 
224
            # https://launchpad.net/bugs/365891
 
225
            prompt = prompt % kwargs
222
226
        prompt = prompt.encode(osutils.get_terminal_encoding(), 'replace')
223
227
        self.clear_term()
224
228
        self.stdout.write(prompt)