This commit is contained in:
Yves MOYROUD 2024-09-26 09:58:37 +09:00 committed by GitHub
commit 3db0b3753b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -899,11 +899,6 @@ def main():
module.fail_json( module.fail_json(
msg="Error unmounting %s: %s" % (name, msg)) msg="Error unmounting %s: %s" % (name, msg))
if os.path.exists(name):
try:
os.rmdir(name)
except (OSError, IOError) as e:
module.fail_json(msg="Error rmdir %s: %s" % (name, to_native(e)))
elif state == 'unmounted': elif state == 'unmounted':
if ismount(name) or is_bind_mounted(module, linux_mounts, name): if ismount(name) or is_bind_mounted(module, linux_mounts, name):
if not module.check_mode: if not module.check_mode: