X-Git-Url: http://git.onelab.eu/?p=nodemanager.git;a=blobdiff_plain;f=conf_files.py;h=7b0cadae0ae1927ccffda1c5e66c23481bf9b8af;hp=a5b2cb2cb1414caa2ce07c56639a29351d39d832;hb=48a73b18fd7daed13c645c1adeddb57b560e7a2d;hpb=7b8fc390afd0349706c45c3ae970770cdf9dceae diff --git a/conf_files.py b/conf_files.py index a5b2cb2..7b0cada 100644 --- a/conf_files.py +++ b/conf_files.py @@ -12,7 +12,7 @@ import string import curlwrapper import logger import tools -import xmlrpclib +import xmlrpc.client from config import Config # right after net @@ -63,7 +63,7 @@ class conf_files: try: logger.verbose("conf_files: retrieving URL=%s"%url) contents = curlwrapper.retrieve(url, self.config.cacert) - except xmlrpclib.ProtocolError as e: + except xmlrpc.client.ProtocolError as e: logger.log('conf_files: failed to retrieve %s from %s, skipping' % (dest, url)) return if not cf_rec['always_update'] and sha(contents).digest() == self.checksum(dest): @@ -78,7 +78,7 @@ class conf_files: if self.system(cf_rec['postinstall_cmd']): self.system(err_cmd) def run_once(self, data): - if data.has_key("conf_files"): + if "conf_files" in data: for f in data['conf_files']: try: self.update_conf_file(f) except: logger.log_exc("conf_files: failed to update conf_file")