X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fdbconn.py;h=fb2cc3b0d6a91808df8d393fd41edf884dc922dc;hb=581e335a6c23d9752d7b88b688537a0ef7072b0b;hp=6827891d555445adfc357f1a1addfcd1c1a1f28b;hpb=dd59ae4dadd3432690a8a3f9c3902c5eddd6e1ae;p=dak.git diff --git a/daklib/dbconn.py b/daklib/dbconn.py index 6827891d..fb2cc3b0 100755 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -515,9 +515,8 @@ class DBBinary(ORMObject): fullpath = self.poolfile.fullpath dpkg = Popen(['dpkg-deb', '--fsys-tarfile', fullpath], stdout = PIPE) tar = TarFile.open(fileobj = dpkg.stdout, mode = 'r|') - anything_yielded = False for member in tar.getmembers(): - if member.isfile(): + if not member.isdir(): name = normpath(member.name) # enforce proper utf-8 encoding try: @@ -525,9 +524,6 @@ class DBBinary(ORMObject): except UnicodeDecodeError: name = name.decode('iso8859-1').encode('utf-8') yield name - anything_yielded = True - if not anything_yielded: - yield ' ' tar.close() dpkg.stdout.close() dpkg.wait() @@ -3008,8 +3004,9 @@ class DBConn(object): table = Table(table_name, self.db_meta, autoload=True) setattr(self, 'tbl_%s' % table_name, table) - # bin_contents needs special attention until update #41 has been - # applied + # bin_contents needs special attention until the SERIAL type is + # correctly detected and the workaround has been removed; see comment + # above self.tbl_bin_contents = Table('bin_contents', self.db_meta, \ Column('file', Text, primary_key = True), Column('binary_id', Integer, ForeignKey('binaries.id'), \