Commits

Anonymous committed 8084452

core: Apply ConfigParser imports in reverse order.

The Mercurial project does a lot of weird monkeypatching to the import process, that results in this error occuring in such a fashion that the try/except won't catch it.

As the Mercurial project is still Python 2.x, I'm opting to swap these imports around so that it Just Works.

Comments (0)

Files changed (1)

 """
 import os
 try:
+    import ConfigParser as config_parser
+except ImportError:
     import configparser as config_parser
-except ImportError:
-    import ConfigParser as config_parser
 import imp
 import sys