no_patch_set = set(x.self_link for x in no_patch)
with_patch_set = set(x.self_link for x in with_patch)
print "len no patch / set no patch", len(no_patch), len(no_patch_set)
print "len with patch / set with patch", len(with_patch), len(with_patch_set)
print "intersection no/with patch", no_patch_set.intersection(with_patch_set)
The list with_patch contains some duplicate results; the intersection of with_patch_set and no_patch_set is not empty.
This inconsistency occurs too for calls of searchTasks(has_patch="true") on distributions and products.
sample launchpadlib script:
ubuntu = launchpad. distributions[ 'ubuntu' ] active_ milestones[ 6]
milestone = ubuntu.
print milestone.name
with_patch = milestone. searchTasks( has_patch= "true") [:100] searchTasks( has_patch= "false" )[:100]
no_patch = milestone.
no_patch_set = set(x.self_link for x in no_patch)
with_patch_set = set(x.self_link for x in with_patch)
print "len no patch / set no patch", len(no_patch), len(no_patch_set) set.intersectio n(with_ patch_set)
print "len with patch / set with patch", len(with_patch), len(with_patch_set)
print "intersection no/with patch", no_patch_
The list with_patch contains some duplicate results; the intersection of with_patch_set and no_patch_set is not empty.
This inconsistency occurs too for calls of searchTasks( has_patch= "true") on distributions and products.