X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fdbconn.py;h=04823061814912e5da33d084acaeb5cc1ecdf45f;hb=cd33ae05e818e0b6161ef4c1a9eb368cae6db5f4;hp=24f8fb17d9620f99570db40e203ac21381ec142c;hpb=4db9c79b71600a48f5323bd75a0ef4f894f02559;p=dak.git diff --git a/daklib/dbconn.py b/daklib/dbconn.py index 24f8fb17..04823061 100755 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -512,9 +512,8 @@ class DBBinary(ORMObject): iso8859-1 encoding. ''' fullpath = self.poolfile.fullpath - debdata = Popen(['dpkg-deb', '--fsys-tarfile', fullpath], - stdout = PIPE).stdout - tar = TarFile.open(fileobj = debdata, mode = 'r|') + dpkg = Popen(['dpkg-deb', '--fsys-tarfile', fullpath], stdout = PIPE) + tar = TarFile.open(fileobj = dpkg.stdout, mode = 'r|') for member in tar.getmembers(): if member.isfile(): try: @@ -523,7 +522,8 @@ class DBBinary(ORMObject): name = member.name.decode('iso8859-1') yield normpath(name) tar.close() - debdata.close() + dpkg.stdout.close() + dpkg.wait() __all__.append('DBBinary')