'Select option from command line or persistent state.
Store selected option to allow standalone client to continue
after reboot with previously selected options.
Priority:
1. explicitly specified via command line
2. stored in state file (if continuing job \'-c\')
3. default is None'

def handle_persistent_option(self, options, option_name):

    option = None
    cmd_line_option = getattr(options, option_name)
    if cmd_line_option:
        option = cmd_line_option
        self._state.set('client', option_name, option)
    else:
        stored_option = self._state.get('client', option_name, None)
        if stored_option:
            option = stored_option
    logging.debug('Persistent    option    %s    now    set    to    %s', option_name, option)
    return option
