Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
entryWithType.append(entryData.tolist()[0])
else:
if (dataType != 33):
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist()[0],
iso_8601=False))
else:
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist()[0]))
else:
if (dataType != 31 and dataType != 32 and dataType != 33):
entryWithType.append(entryData.tolist())
else:
if (dataType != 33):
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist(),
iso_8601=False))
else:
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist()))
entryWithType.append(CDF._datatype_token(aedr_info['data_type']))
entries[aedr_info['entry_num']] = entryWithType
aedr_byte_loc = aedr_info['next_aedr']
if (len(entries) != 0):
if (expand is False):
if (len(entries) == 1):
return_dict[adr_info['name']] = entries[0]
else:
return_dict[adr_info['name']] = entries
else:
return_dict[adr_info['name']] = entries
byte_loc = adr_info['next_adr_location']
return return_dict
dataType = aedr_info['data_type']
if (len(entryData.tolist()) == 1):
if (dataType != 31 and dataType != 32 and dataType != 33):
entryWithType.append(entryData.tolist()[0])
else:
if (dataType != 33):
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist()[0],
iso_8601=False))
else:
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist()[0]))
else:
if (dataType != 31 and dataType != 32 and dataType != 33):
entryWithType.append(entryData.tolist())
else:
if (dataType != 33):
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist(),
iso_8601=False))
else:
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist()))
entryWithType.append(CDF._datatype_token(aedr_info['data_type']))
entries[aedr_info['entry_num']] = entryWithType
aedr_byte_loc = aedr_info['next_aedr']
if (len(entries) != 0):
if (expand is False):
if (len(entries) == 1):
return_dict[adr_info['name']] = entries[0]
else:
return_dict[adr_info['name']] = entries
else:
return_dict[adr_info['name']] = entries
byte_loc = adr_info['next_adr_location']
return_dict[adr_info['name']] = entryData
else:
entryWithType = []
if (isinstance(entryData, str)):
entryWithType.append(entryData)
else:
dataType = aedr_info['data_type']
if (dataType != 31 and dataType != 32 and dataType != 33):
if (len(entryData.tolist()) == 1):
entryWithType.append(entryData.tolist()[0])
else:
entryWithType.append(entryData.tolist())
else:
if (len(entryData.tolist()) == 1):
if (dataType != 33):
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist()[0],
iso_8601=False))
else:
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist()[0]))
else:
if (dataType != 33):
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist(),
iso_8601=False))
else:
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist()))
entryWithType.append(CDF._datatype_token(aedr_info['data_type']))
return_dict[adr_info['name']] = entryWithType
found = 1
break
byte_loc = adr_info['next_adr_location']
if (found == 0 and expand != False):
return_dict[adr_info['name']] = None
entries.append(entryData)
else:
entryWithType = []
if (isinstance(entryData, str)):
entryWithType.append(entryData)
else:
dataType = aedr_info['data_type']
if (len(entryData.tolist()) == 1):
if (dataType != 31 and dataType != 32 and dataType != 33):
entryWithType.append(entryData.tolist()[0])
else:
if (dataType != 33):
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist()[0],
iso_8601=False))
else:
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist()[0]))
else:
if (dataType != 31 and dataType != 32 and dataType != 33):
entryWithType.append(entryData.tolist())
else:
if (dataType != 33):
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist(),
iso_8601=False))
else:
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist()))
entryWithType.append(CDF._datatype_token(aedr_info['data_type']))
entries[aedr_info['entry_num']] = entryWithType
aedr_byte_loc = aedr_info['next_aedr']
if (len(entries) != 0):
if (expand is False):
if (len(entries) == 1):
dataType = aedr_info['data_type']
if (dataType != 31 and dataType != 32 and dataType != 33):
if (len(entryData.tolist()) == 1):
entryWithType.append(entryData.tolist()[0])
else:
entryWithType.append(entryData.tolist())
else:
if (len(entryData.tolist()) == 1):
if (dataType != 33):
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist()[0],
iso_8601=False))
else:
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist()[0]))
else:
if (dataType != 33):
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist(),
iso_8601=False))
else:
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist()))
entryWithType.append(CDF._datatype_token(aedr_info['data_type']))
return_dict[adr_info['name']] = entryWithType
found = 1
break
byte_loc = adr_info['next_adr_location']
if (found == 0 and expand != False):
return_dict[adr_info['name']] = None
return return_dict
if (isinstance(entryData, str)):
entryWithType.append(entryData)
else:
dataType = aedr_info['data_type']
if (dataType != 31 and dataType != 32 and dataType != 33):
if (len(entryData.tolist()) == 1):
entryWithType.append(entryData.tolist()[0])
else:
entryWithType.append(entryData.tolist())
else:
if (len(entryData.tolist()) == 1):
if (dataType != 33):
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist()[0],
iso_8601=False))
else:
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist()[0]))
else:
if (dataType != 33):
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist(),
iso_8601=False))
else:
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist()))
entryWithType.append(CDF._datatype_token(aedr_info['data_type']))
return_dict[adr_info['name']] = entryWithType
found = 1
break
byte_loc = adr_info['next_adr_location']
if (found == 0 and expand != False):
return_dict[adr_info['name']] = None
return return_dict
entryWithType.append(entryData.tolist()[0])
else:
entryWithType.append(entryData.tolist())
else:
if (len(entryData.tolist()) == 1):
if (dataType != 33):
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist()[0],
iso_8601=False))
else:
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist()[0]))
else:
if (dataType != 33):
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist(),
iso_8601=False))
else:
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist()))
entryWithType.append(CDF._datatype_token(aedr_info['data_type']))
return_dict[adr_info['name']] = entryWithType
found = 1
break
byte_loc = adr_info['next_adr_location']
if (found == 0 and expand != False):
return_dict[adr_info['name']] = None
return return_dict
aedr_info = self._read_aedr2(aedr_byte_loc, to_np=to_np)
entryData = aedr_info['entry']
if (expand is False):
entries.append(entryData)
else:
entryWithType = []
if (isinstance(entryData, str)):
entryWithType.append(entryData)
else:
dataType = aedr_info['data_type']
if (len(entryData.tolist()) == 1):
if (dataType != 31 and dataType != 32 and dataType != 33):
entryWithType.append(entryData.tolist()[0])
else:
if (dataType != 33):
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist()[0],
iso_8601=False))
else:
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist()[0]))
else:
if (dataType != 31 and dataType != 32 and dataType != 33):
entryWithType.append(entryData.tolist())
else:
if (dataType != 33):
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist(),
iso_8601=False))
else:
entryWithType.append(epoch.CDFepoch.encode(entryData.tolist()))
entryWithType.append(CDF._datatype_token(aedr_info['data_type']))
entries[aedr_info['entry_num']] = entryWithType
aedr_byte_loc = aedr_info['next_aedr']