Description: Fix configparser import to work on python3 This patch fixes the way the ConfigParser class is imported to work on both the python2.x stdlib and python3.x stdlib. Author: Zygmunt Krynicki Bug-Ubuntu: https://bugs.launchpad.net/pkginfo/+bug/1367434 Forwarded: no Last-Update: 2014-09-09 --- python-pkginfo-1.1.orig/pkginfo/commandline.py +++ python-pkginfo-1.1/pkginfo/commandline.py @@ -16,7 +16,11 @@ o a "develop" checkout: in ths case, ' o an installed package: in this case, 'path' should be the importable name of the package. """ -from ConfigParser import ConfigParser +import sys +if sys.version_info[0] == 3: + from configparser import ConfigParser +else: + from ConfigParser import ConfigParser from csv import writer import optparse import os