Swap the order of configparser imports

The configparser backport package has un-understood issues parsing
our files. But the intent of the code is to use whichever is the
package for the version of python in use. So, instead of trying to
install the python3 version first, which can also result in loading
the backport package, first try the python2 package, so that if
configparser itself is loaded, it will be because we're running python3.

Change-Id: I7ef497127822d0110804b04a674f24c195a07278
This commit is contained in:
Monty Taylor
2013-07-25 08:49:52 -07:00
parent 2efd8ba8e2
commit 37f5b545ae
2 changed files with 4 additions and 4 deletions

View File

@@ -44,9 +44,9 @@ import shutil
import stat
try:
import configparser
except ImportError:
import ConfigParser as configparser
except ImportError:
import configparser
@contextlib.contextmanager

View File

@@ -73,9 +73,9 @@ from setuptools.dist import Distribution
from setuptools.extension import Extension
try:
import configparser
except ImportError:
import ConfigParser as configparser
except ImportError:
import configparser
import pbr.hooks