
    9i                     T    S r SSKrSSKrSSKJr  SSKJr  SSKJr  SSK	J
r
  S rS rg)	zg
This module provides general http handler functions for processing http responses from TSDB services.
    N)utils)BceClientError)BceServerError)Expandoc                     U R                  5       nU(       a<  UR                  R                  [        R                  " U[
        S9R                  5        U R                  5         g)a  If the body is not empty, convert it to a python object and set as the value of
response.body. http_response is always closed if no error occurs.

:param http_response: the http_response object returned by HTTPConnection.getresponse()
:type http_response: httplib.HTTPResponse

:param response: general response object which will be returned to the caller
:type response: baidubce.BceResponse

:return: always true
:rtype bool
)object_hookT)read__dict__updatejsonloadsdict_to_python_objectclose)http_responseresponsebodys      c/var/www/html/land-doc-ocr/venv/lib/python3.13/site-packages/baidubce/services/tsdb/tsdb_handler.py
parse_jsonr      sJ     D  D>S!T!]!]^    c                 ~    0 n[        U R                  5       5       H  u  p#[        U5      nX1U'   M     [        U5      $ )z

:param d:
:return:
)listitemsstrr   )dattrkvs       r   r   r   ,   s;     DQWWYFQ   4=r   )__doc__http.clienthttpr   baidubcer   baidubce.exceptionr   r   baidubce.utilsr   r   r    r   r   <module>r%      s(       - - "(
r   