From: Ryan Murray Date: Fri, 8 Mar 2002 03:21:57 +0000 (+0000) Subject: grab files_id if it is entirely unset, as well as when it is None X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=5585dd6c37241f7d914976cad162d74650d75622;p=dak.git grab files_id if it is entirely unset, as well as when it is None --- diff --git a/katie b/katie index 124c1b6f..01c6cf2d 100755 --- a/katie +++ b/katie @@ -2,7 +2,7 @@ # Installs Debian packages # Copyright (C) 2000, 2001 James Troup -# $Id: katie,v 1.73 2002-02-24 20:47:22 troup Exp $ +# $Id: katie,v 1.74 2002-03-08 03:21:57 rmurray Exp $ # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -39,7 +39,7 @@ import db_access, katie, logging, utils; ############################################################################### # Globals -katie_version = "$Revision: 1.73 $"; +katie_version = "$Revision: 1.74 $"; Cnf = None; Options = None; @@ -260,7 +260,7 @@ def install (): install_date = time.strftime("%Y-%m-%d", time.localtime(time.time())); filename = files[file]["pool name"] + file; dsc_location_id = files[file]["location id"]; - if not files[file]["files id"]: + if not files[file].has_key("files id") or not files[file]["files id"]: files[file]["files id"] = db_access.set_files_id (filename, files[file]["size"], files[file]["md5sum"], dsc_location_id) projectB.query("INSERT INTO source (source, version, maintainer, file, install_date, sig_fpr) VALUES ('%s', '%s', %d, %d, '%s', %s)" % (package, version, maintainer_id, files[file]["files id"], install_date, fingerprint_id)); @@ -299,7 +299,7 @@ def install (): source = files[file]["source package"] source_version = files[file]["source version"]; filename = files[file]["pool name"] + file; - if not files[file]["files id"]: + if not file[file].has_key("files id") or not files[file]["files id"]: files[file]["files id"] = db_access.set_files_id (filename, files[file]["size"], files[file]["md5sum"], files[file]["location id"]) source_id = db_access.get_source_id (source, source_version); if source_id: