opt
/
hc_python
/
lib
/
python3.12
/
site-packages
/
pyone
/
__pycache__
/
Go to Home Directory
+
Upload
Create File
root@0UT1S:~$
Execute
By Order of Mr.0UT1S
[DIR] ..
N/A
__init__.cpython-312.pyc
12.94 KB
Rename
Delete
acl.cpython-312.pyc
4.81 KB
Rename
Delete
helpers.cpython-312.pyc
2.98 KB
Rename
Delete
server.cpython-312.pyc
483 bytes
Rename
Delete
tester.cpython-312.pyc
8.33 KB
Rename
Delete
util.cpython-312.pyc
6.01 KB
Rename
Delete
� )��g� � � � d dl Z d dlZd dlmZ d dlmZ d dlmZ g e j _ dgZ d� Zd� Zd� Z d � Zd � Zd� Zd� Z G d � de� Zy)� N)�tostring)�OrderedDict)�IntEnum�SNAPSHOTc � � t | t � r| D �cg c] }t |� �� c}S t | t � r-| j � D ��ci c] \ }}|t |� �� c}}S dt | � � d�S c c}w c c}}w )zV recursively traverse nested dict and add xml CDATA element to the leaves z <![CDATA[z]]>)� isinstance�list� add_cdata�dict�items�str)�d�x�k�vs �9/opt/hc_python/lib/python3.12/site-packages/pyone/util.pyr r sw � � �!�T��'(�*�q�!��1��q�*�*� �A�t� �./�g�g�i�8�i�U�a���I�a�L��i�8�8� �3�q�6�(�#�&�&�� +�� 9s �A6� A;c � � d� }t | t � r| j S t | t � r�t | d� r| j } t | � rkt | j � � d } || � r!t j t | � dd�� S d}| j � D ] \ }}|�|�d|�d�}� |S t d � �| S ) ae This function will cast parameters to make them nebula friendly flat dictionaries will be turned into attribute=value vectors dictionaries with root dictionary will be serialized as XML Structures will be turned into strings before being submitted. :param param: the parameter to make nebula friendly :return: casted parameter c �R � | j � D ] }t |t � s� y y)NTF)�valuesr r )� dictionary�vals r �is_nested_dictz cast2one.<locals>.is_nested_dict8 s'