Commit 345329b6 by Dylan Martin

toned down the error message for unconfigured master/slave

parent 6b26a736
...@@ -305,15 +305,15 @@ def main(): ...@@ -305,15 +305,15 @@ def main():
masterstatus = get_master_status(cursor) masterstatus = get_master_status(cursor)
try: try:
module.exit_json( **masterstatus ) module.exit_json( **masterstatus )
except TypeError, e: except TypeError:
module.fail_json(msg="Server is not configured as mysql master: %s" % e) module.fail_json(msg="Server is not configured as mysql master")
elif mode in "getslave": elif mode in "getslave":
slavestatus = get_slave_status(cursor) slavestatus = get_slave_status(cursor)
try: try:
module.exit_json( **slavestatus ) module.exit_json( **slavestatus )
except TypeError, e: except TypeError:
module.fail_json(msg="Server is not configured as mysql slave: %s" % e) module.fail_json(msg="Server is not configured as mysql slave")
elif mode in "changemaster": elif mode in "changemaster":
print "Change master" print "Change master"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment