Ejemplo n.º 1
0
    m_values = parse_connection(opt.master)
except FormatError, e:
    parser.error("Master connection values invalid or cannot be parsed.")

# Parse source connection values
try:
    s_values = parse_connection(opt.slave)
except FormatError, e:
    parser.error("Slave connection values invalid or cannot be parsed.")

# Create dictionary of options
options = {
    'verbosity'    : opt.verbosity,
    'pedantic'     : False,
    'quiet'        : opt.quiet,
    'suppress'     : opt.suppress,
    'master_info'  : opt.master_info,
    'slave_status' : opt.slave_status,
    'width'        : opt.width
}
  
try:
    res = check_replication(m_values, s_values, options)
    if res:
        exit(1)
except UtilError, e:
    print "ERROR:", e.errmsg
    exit(1)

exit()
Ejemplo n.º 2
0
    m_values = parse_connection(opt.master)
except FormatError, e:
    parser.error("Master connection values invalid or cannot be parsed.")

# Parse source connection values
try:
    s_values = parse_connection(opt.slave)
except FormatError, e:
    parser.error("Slave connection values invalid or cannot be parsed.")

# Create dictionary of options
options = {
    'verbosity': opt.verbosity,
    'pedantic': False,
    'quiet': opt.quiet,
    'suppress': opt.suppress,
    'master_info': opt.master_info,
    'slave_status': opt.slave_status,
    'width': opt.width
}

try:
    res = check_replication(m_values, s_values, options)
    if res:
        exit(1)
except UtilError, e:
    print "ERROR:", e.errmsg
    exit(1)

exit()