Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed missing module argument for mount module #860

Merged
merged 1 commit into from
Aug 13, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions library/mount
Original file line number Diff line number Diff line change
Expand Up @@ -215,21 +215,21 @@ def main():
if os.path.ismount(name):
res,msg = umount(**args)
if res:
fail_json(msg="Error unmounting %s: %s" % (name, msg))
module.fail_json(msg="Error unmounting %s: %s" % (name, msg))

if os.path.exists(name):
try:
os.rmdir(name)
except (OSError, IOError), e:
fail_json(msg="Error rmdir %s: %s" % (name, str(e)))
module.fail_json(msg="Error rmdir %s: %s" % (name, str(e)))

module.exit_json(changed=changed, **args)

if state == 'unmounted':
if os.path.ismount(name):
res,msg = umount(**args)
if res:
fail_json(msg="Error unmounting %s: %s" % (name, msg))
module.fail_json(msg="Error unmounting %s: %s" % (name, msg))
changed = True

module.exit_json(changed=changed, **args)
Expand All @@ -241,7 +241,7 @@ def main():
try:
os.makedirs(name)
except (OSError, IOError), e:
fail_json(msg="Error making dir %s: %s" % (name, str(e)))
module.fail_json(msg="Error making dir %s: %s" % (name, str(e)))

res = 0
if os.path.ismount(name):
Expand All @@ -252,7 +252,7 @@ def main():
res,msg = mount(**args)

if res:
fail_json(msg="Error mounting %s: %s" % (name, msg))
module.fail_json(msg="Error mounting %s: %s" % (name, msg))


module.exit_json(changed=changed, **args)
Expand Down