1 of 1 people found this helpful
After debugging into this, it looks like it is picking up the linefeed characters (\n) as part of the system name (system "foo" gets read in as "foo\n" and it can't find the system). This is, obviously, less than ideal. However, if you provide the list of system names as a comma-delimited list, it will work properly and tag them all in one pass (you will want a comma after the final name, as well, to avoid the linefeed character being picked up there).
I am not sure if this is a behavior that changed at some point, as all of the examples provided in the guide were tested, but hopefully this workaround will work for your situation. I will file a defect to track this issue further.
Thanks for the reply tkincher.
I found out just before you posted your response. Kind of silly since the docs provided don't mention that and the sample doc is laid out and the assumption was made that it's suppose to be that way, not as a comma seperated file. Since I'm not a Pyhton expert it was very frustrating, but it's all good now.
So McAfee shouldn't be expected by anybody to debug scripts that their customers are using, but they should document the feature with enough information so that the feature can be used. After having the same problem, (and not wanting to manipulate the file) I prowled the python forums, and found the rstrip method, which strips out the \n and the whitespace in the file.
i modified the for loop in the example a bit to look like:
file = open('foo.txt')
for line in file:
After that it works like a champ.
BTW I checked and re-checked the McAfee published Python API guide, and it says that the systems should be listed one per line.