ceph-disk: remove twice defined function mount

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
This commit is contained in:
Danny Al-Gaaf 2013-03-19 22:02:49 +01:00
parent c57daa3c6e
commit ea26ea0d81

View File

@ -1210,40 +1210,6 @@ def detect_fstype(
return fstype
def mount(
dev,
fstype,
options,
):
# pick best-of-breed mount options based on fs type
if options is None:
options = MOUNT_OPTIONS.get(fstype, '')
# mount
path = tempfile.mkdtemp(
prefix='mnt.',
dir='/var/lib/ceph/tmp',
)
try:
subprocess.check_call(
args=[
'/bin/mount',
'-o', options,
'--',
dev,
path,
],
)
except subprocess.CalledProcessError as e:
try:
os.rmdir(path)
except (OSError, IOError):
pass
raise MountError(e)
return path
def unmount(
path,
):