def __get_artifact(salt_source):
    resolved_source = None
    comment = None

    if salt_source is None:
        log.debug('salt_source == None')
        comment = 'No salt_source defined'

    elif isinstance(salt_source, dict):
        log.debug('file from salt master')

        if salt_source in 'source':
            try:
                sfn, source_sum, comment_ = __salt__['file.get_managed'](
                    name=salt_source['target_file'],
                    template=None,
                    source=salt_source['source'],
                    source_hash=None,
                    user=None,
                    group=None,
                    mode=None,
                    saltenv=__env__,
                    context=None,
                    defaults=None,
                    kwargs=None)

                manage_result = __salt__['file.manage_file'](
                    name=salt_source['target_file'],
                    sfn=sfn,
                    ret=None,
                    source=salt_source['source'],
                    source_sum=source_sum,
                    user=None,
                    group=None,
                    mode=None,
                    saltenv=__env__,
                    backup=None,
                    makedirs=False,
                    template=None,
                    show_diff=True,
                    contents=None,
                    dir_mode=None)

                if manage_result['result']:
                    resolved_source = salt_source['target_file']
                else:
                    comment = manage_result['comment']

            except Exception as e:
                log.debug(traceback.format_exc())
                comment = 'Unable to manage file: {0}'.format(e)

            else:
                resolved_source = salt_source['target_file']
                comment = ''

    return resolved_source, comment
dataset/ETHPy150Open saltstack/salt/salt/states/jboss7.py/__get_artifact/swapped operands of `in`