def get_task_detail(self, task_name):
        """
        Get task's detail

        :param task_name: task name
        :return: the task's detail
        :rtype: list or dict according to the JSON
        """
        def _get_detail():
            from ..compat import json  # fix object_pairs_hook parameter for Py2.6

            params = {'instancedetail': '',
                      'taskname': task_name}

            resp = self._client.get(self.resource(), params=params)
            return json.loads(resp.text if six.PY3 else resp.content,
                              object_pairs_hook=OrderedDict)

        result = _get_detail()
        if not result:
            # todo: this is a workaround for the bug that get_task_detail returns nothing.
            self.get_task_detail2(task_name)
            return _get_detail()
        else:
            return result
Get task's detail

        :param task_name: task name
        :return: the task's detail
        :rtype: list or dict according to the JSON