if hostname is an absolute path, strip alway leading slash
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
parent
44dbe6f2fe
commit
c130bdf534
1 changed files with 6 additions and 1 deletions
|
@ -194,7 +194,12 @@ class Local(object):
|
||||||
return self.run(command=command, env=env, return_output=return_output, message_prefix=message_prefix)
|
return self.run(command=command, env=env, return_output=return_output, message_prefix=message_prefix)
|
||||||
|
|
||||||
def save_cache(self):
|
def save_cache(self):
|
||||||
destination = os.path.join(self.cache_path, self.target_host)
|
if os.path.isabs(self.target_host):
|
||||||
|
hostdir = self.target_host[1:]
|
||||||
|
else:
|
||||||
|
hostdir = self.target_host
|
||||||
|
|
||||||
|
destination = os.path.join(self.cache_path, hostdir)
|
||||||
self.log.debug("Saving " + self.base_path + " to " + destination)
|
self.log.debug("Saving " + self.base_path + " to " + destination)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue