toned down the error message for unconfigured master/slave

This commit is contained in:
Dylan Martin 2013-10-10 09:15:47 -07:00
commit 345329b69f

View file

@ -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"