X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=daklib%2Fbinary.py;h=5290410254214be9e105fc41819d346e35769827;hb=3f09afb2e5398920f7c503902adac48a67f330c4;hp=8dd9b30113cdf7800aa2420d0e0726a3a5374d2b;hpb=5c4242ac752fcc98787ecf0d84927f907808e36e;p=dak.git diff --git a/daklib/binary.py b/daklib/binary.py index 8dd9b301..52904102 100755 --- a/daklib/binary.py +++ b/daklib/binary.py @@ -110,7 +110,7 @@ class Binary(object): # a temporary directory if not self.tmpdir: - tmpdir = tempfile.mkdtemp() + tmpdir = utils.temp_dirname() cwd = os.getcwd() try: os.chdir( tmpdir ) @@ -186,12 +186,12 @@ class Binary(object): if bootstrap_id: result = DBConn().insert_content_paths(bootstrap_id, [tarinfo.name for tarinfo in data if not tarinfo.isdir()]) else: - pkg = deb822.Packages.iter_paragraphs(file(os.path.join(self.tmpdir,'control'))).next() + pkgs = deb822.Packages.iter_paragraphs(file(os.path.join(self.tmpdir,'control'))) + pkg = pkgs.next() result = DBConn().insert_pending_content_paths(pkg, [tarinfo.name for tarinfo in data if not tarinfo.isdir()]) except: traceback.print_exc() - result = False os.chdir(cwd) return result