- if is_mounted (root_ssh):
- # xxx perform umount
- subprocess.call("umount %s"%(root_ssh),shell=True)
- logger.log("_manage_ssh_dir: umounted %s"%(root_ssh))
- except:
- logger.log_exc("_manage_ssh_dir with slice %s failed"%slicename)
+ if is_mounted (sliver_ssh):
+ command = ['umount', sliver_ssh]
+ umounted = logger.log_call(command)
+ msg = "OK" if umounted else "WARNING: FAILED"
+ logger.log("_manage_ssh_dir: umounted {} - {}"
+ .format(sliver_ssh, msg))
+ except Exception as e:
+ logger.log_exc("_manage_ssh_dir failed : {}".format(e), name=slicename)