config2: use repr() of exceptions to prevent UnicodeDecodeErrors
config2: use repr() of exceptions to prevent UnicodeDecodeErrors

When no program is configured to open .py files, the
_win32_extension_command function will throw an OSError. On non-English
Windows versions, this error often contains non-ascii characters. On
Python 2, this error will be a str in the Windows' multi byte encoding.
Trying to decode this error with a different encoding will cause an
UnicodeDecodeError, which then blocks Pywikibot from being used.

Instead of trying to guess the correct encoding to use, use the repr()
of the string. This is guaranteed to be ascii, and can therefore always
be embedded in a unicode string safely.

Bug: T120222
Change-Id: I47e2756259ecbc1279e1124c076622177b3fc1d6

PersianWikipedia/pywikibot-core,Darkdadaah/pywikibot-core,happy5214/pywikibot-core,npdoty/pywikibot,wikimedia/pywikibot-core,hasteur/g13bot_tools_new,jayvdb/pywikibot-core,npdoty/pywikibot,hasteur/g13bot_tools_new,jayvdb/pywikibot-core,hasteur/g13bot_tools_new,magul/pywikibot-core,wikimedia/pywikibot-core,happy5214/pywikibot-core,Darkdadaah/pywikibot-core,magul/pywikibot-core