...but your test file is very different from the faulty code: # get conffile value from pkg pkg_conffiles = apt_inst.debExtractControl( open(destFile), "conffiles") with destFile = '/var/cache/apt/archives/brltty_4.2-8ubuntu1_amd64.deb'. $ cat /tmp/test2.py import apt_pkg import apt_inst import sys destFile = sys.argv[1] pkg_conffiles = apt_inst.debExtractControl(open(destFile), "conffiles") print repr(pkg_conffiles) $ python /tmp/test2.py /var/cache/apt/archives/brltty_4.2-8ubuntu1_amd64.deb Traceback (most recent call last): File "/tmp/test2.py", line 6, in pkg_conffiles = apt_inst.debExtractControl(open(destFile), "conffiles") SystemError: E:Unparsable control file $ apt-cache policy brltty brltty: Installed: 4.2-4ubuntu2 Candidate: 4.2-8ubuntu1 Version table: 4.2-8ubuntu1 0 500 http://archive.ubuntu.com/ubuntu/ natty/main amd64 Packages *** 4.2-4ubuntu2 0 100 /var/lib/dpkg/status $ apt-cache show brltty Package: brltty Priority: extra Section: admin Installed-Size: 6124 Maintainer: Ubuntu Developers