X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=inline;f=daklib%2Futils.py;h=01ed2ede03e0ef281a2261813c0a2c943732d4d2;hb=8752b2fed37bee42a2ce7046385e99ff5035c37c;hp=c1be6b9014950f2ec798f09ee14b3aaac9599944;hpb=6a4cddfbe864e563e671fe5dabf5600c4783af5c;p=dak.git diff --git a/daklib/utils.py b/daklib/utils.py index c1be6b90..01ed2ede 100755 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -260,6 +260,7 @@ def create_hash(where, files, hashname, hashfunc): file_handle = open_file(f) except CantOpenError: rejmsg.append("Could not open file %s for checksumming" % (f)) + continue files[f][hash_key(hashname)] = hashfunc(file_handle) @@ -744,6 +745,15 @@ def where_am_i (): def which_conf_file (): res = socket.gethostbyaddr(socket.gethostname()) + # In case we allow local config files per user, try if one exists + if Cnf.FindB("Config::" + res[0] + "::AllowLocalConfig"): + homedir = os.getenv("HOME") + confpath = os.path.join(homedir, "/etc/dak.conf") + if os.path.exists(confpath): + apt_pkg.ReadConfigFileISC(Cnf,default_config) + + # We are still in here, so there is no local config file or we do + # not allow local files. Do the normal stuff. if Cnf.get("Config::" + res[0] + "::DakConfig"): return Cnf["Config::" + res[0] + "::DakConfig"] else: