I can't seem to get a comma embedded string (i.e. an LDIF DN value) to save as a key in an associative list without the value being interpreted as a list itself. I can't find a method that will cause the value of the string variable to be interpreted intact with the commas. I've verified that the "dn" variable is typed as a string.
Here is a snippet of my code:
for (dn, entry) in result_set[i]: results[dn]['printerName'] = entry['printerName'][0] [\code]
Results in a Keyerror over the "dn" variable:
KeyError: 'CN=REHP004,OU=servers,DC=example,DC=com'
Sorry, I'm a python newb. I hope this makes sense.[code=python]
for (dn, entry) in result_set:
results[dn] = entry[0]
[\code]
Results in a Keyerror over the "dn" variable:
KeyError: 'CN=REHP004,OU=servers,DC=example,DC=com'
Sorry, I'm a python newb. I hope this makes sense.