def build_command(self, project, deployment, session, abort_on_prompts=True):
        # Get the dictionary of configurations for this stage
        configs = deployment.stage.get_configurations()

        configs, arg_values = self.update_config_values_from_session(configs, session)

        task_args = [key for key, config in configs.iteritems() if config.task_argument and config.task_name == deployment.task.name]
        task_configs = [key for key, config in configs.iteritems() if not config.task_argument]

        command_to_config = {x.replace('-', '_'): x for x in self.get_special_options()}

        # Take the special env variables out
        normal_task_configs = list(set(task_configs) - set(command_to_config.keys()))

        # Special ones get set a different way
        special_task_configs = list(set(task_configs) & set(command_to_config.keys()))

        command = 'fab ' + deployment.task.name

        task_details = self.get_task_details(project, deployment.task.name)

        task_args = list(set(task_args + [x[0] if isinstance(x, tuple) else x for x in task_details[2]]))

        if task_args:
            key_value_strings = []
            for key in task_args:
                if key in configs:
                    value = unicode(configs[key].get_value())
                elif arg_values in key:
                    value = unicode(arg_values[key])
                else:
                    continue

                cleaned_key = self.clean_arg_key_string(key)
                value = self.clean_value_string(value)
                key_value_strings.append('{}="{}"'.format(cleaned_key, value))

            if key_value_strings:
                command += ':'
                command += ','.join(key_value_strings)

        if normal_task_configs:
            command += ' --set '
            command += '"' + ','.join(self.get_key_value_string(key, configs[key]) for key in normal_task_configs) + '"'

        if special_task_configs:
            for key in special_task_configs:
                if key == 'key_filename':
                    command += ' -i ' + configs[key].get_value()
                else:
                    command += ' --' + self.get_key_value_string(command_to_config[key], configs[key])

        if abort_on_prompts:
            command += ' --abort-on-prompts'

        hosts = deployment.stage.hosts.values_list('name', flat=True)
        if hosts:
            command += ' --hosts=' + ','.join(hosts)

        if not configs.get('key_filename'):
            # Get global SSH
            ssh_config = SSHConfig.objects.first()

            if ssh_config:
                command += ' -i ' + ssh_config.private_key_file.file.name

                if not configs.get('user'):
                    command += ' -u ' + ssh_config.remote_user

        fabfile_path, active_loc = self.get_fabfile_path(project)
        command += ' --fabfile={}'.format(fabfile_path)

        if active_loc:
            return 'source {};'.format(active_loc) + ' ' + command
        else:
            return command
dataset/ETHPy150Open fabric-bolt/fabric-bolt/fabric_bolt/task_runners/base.py/BaseTaskRunnerBackend.build_command/swapped operands of `in`