[ovs-dev] [PATCH] utilities: Implement ovs-vlan-test script
Ethan Jackson
ethan at nicira.com
Tue Dec 21 06:44:14 UTC 2010
Thanks for the python tips. I'll incorporate them before merging.
> Could utilize the 'split' function here. In its simplest invocation it
> could just be:
>
> data_str = data.split(chr(0))[0]
Ah yah I ended up just multiplying chr(0) times the number of filler
bytes I needed and appending it.
> Wouldn't this indicate an error of some sort if the key was already in the
> result?
> Also, there is a convenience syntax 'not in'
>
> if key not in self.result:
It could happen as the result of a race condition where the success
and failure callback run concurrently. Specifically I am worried
about the success callback running and then being overwritten by the
failure callback. It's definitely an edge case, but it doesn't hurt
to guard it.
Ethan
More information about the dev
mailing list