This commit is contained in:
Darko Poljak 2017-06-29 14:46:35 +02:00 committed by Steven Armstrong
parent a37d286d67
commit 015861e63b
2 changed files with 4 additions and 3 deletions

View file

@ -297,7 +297,8 @@ class Local(object):
self.cache_path_pattern) self.cache_path_pattern)
self.log.debug("cache subpath: {}".format(cache_subpath)) self.log.debug("cache subpath: {}".format(cache_subpath))
destination = os.path.join(self.cache_path, cache_subpath) destination = os.path.join(self.cache_path, cache_subpath)
self.log.debug("Saving " + self.base_path + " to " + destination) self.log.trace(("Saving cache: " + self.base_path + " to " +
destination))
if not os.path.exists(destination): if not os.path.exists(destination):
shutil.move(self.base_path, destination) shutil.move(self.base_path, destination)

View file

@ -46,7 +46,7 @@ def resolve_target_host_name(host):
host, host_name)) host, host_name))
except (socket.gaierror, socket.herror) as e: except (socket.gaierror, socket.herror) as e:
log.warning("Could not derive host_name for {}" log.warning("Could not derive host_name for {}"
", $host_name will be empty. Error is: {}".format(host, e)) ", $host_name will be empty. Error is: {}".format(host, e))
# in case of error provide empty value # in case of error provide empty value
host_name = '' host_name = ''
return host_name return host_name
@ -60,7 +60,7 @@ def resolve_target_fqdn(host):
host, host_fqdn)) host, host_fqdn))
except socket.herror as e: except socket.herror as e:
log.warning("Could not derive host_fqdn for {}" log.warning("Could not derive host_fqdn for {}"
", $host_fqdn will be empty. Error is: {}".format(host, e)) ", $host_fqdn will be empty. Error is: {}".format(host, e))
# in case of error provide empty value # in case of error provide empty value
host_fqdn = '' host_fqdn = ''
return host_fqdn return host_fqdn