From: Mark Huang <mlhuang@cs.princeton.edu> Date: Fri, 12 Jan 2007 00:07:56 +0000 (+0000) Subject: - gracefully skip non-existent conf files X-Git-Tag: planetlab-4_0-rc1~17 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=355187f3cecaac06024d5819ac3bcbb304b09a37;p=nodemanager.git - gracefully skip non-existent conf files --- diff --git a/conf_files.py b/conf_files.py index a7d70e8..d584c2a 100644 --- a/conf_files.py +++ b/conf_files.py @@ -42,7 +42,11 @@ class conf_files: uid = pwd.getpwnam(cf_rec['file_owner'])[2] gid = grp.getgrnam(cf_rec['file_group'])[2] url = 'https://%s/%s' % (self.config.PLC_BOOT_HOST, cf_rec['source']) - contents = curlwrapper.retrieve(url, self.config.cacert) + try: + contents = curlwrapper.retrieve(url, self.config.cacert) + except curlwrapper.CurlException: + logger.log('conf_files: failed to retrieve %s from %s, skipping' % (dest, url)) + return if not cf_rec['always_update'] and sha.new(contents).digest() == self.checksum(dest): return if self.system(cf_rec['preinstall_cmd']):