Revision: 8054 Author: russblau Date: 2010-04-05 20:45:17 +0000 (Mon, 05 Apr 2010)
Log Message: ----------- Apparently some operating systems can return unicode input.
Modified Paths: -------------- branches/rewrite/pywikibot/userinterfaces/terminal_interface.py
Modified: branches/rewrite/pywikibot/userinterfaces/terminal_interface.py =================================================================== --- branches/rewrite/pywikibot/userinterfaces/terminal_interface.py 2010-04-05 16:24:15 UTC (rev 8053) +++ branches/rewrite/pywikibot/userinterfaces/terminal_interface.py 2010-04-05 20:45:17 UTC (rev 8054) @@ -180,7 +180,8 @@ finally: TerminalHandler.sharedlock.release()
- text = unicode(text, config.console_encoding) + if not isinstance(text, unicode): + text = unicode(text, config.console_encoding) return text
def inputChoice(self, question, options, hotkeys, default=None):