def check_master(client, master_only=False):
 if (master_only and (not is_master_node(client))):
  logger.info('Master-only flag detected. Connected to non-master node. Aborting.')
  sys.exit(0)

def check_master ( client , master_only = False ) : if ( master_only and ( not is_master_node ( client ) ) ) : logger . info ( 'Master-only flag detected. Connected to non-master node. Aborting.' ) sys . exit ( 0 )
check if connected client is the elected master node of the cluster .