Break when already find match package pair release-0.1
authorLin Yang <lin.a.yang@intel.com>
Fri, 18 Apr 2014 02:20:59 +0000 (10:20 +0800)
committerLin Yang <lin.a.yang@intel.com>
Fri, 18 Apr 2014 02:20:59 +0000 (10:20 +0800)
The match package pair will be removed from the list, should quit to top level
to process next package.

Change-Id: I3d11cd8202a9b1ae9f5f03dc19afa273051de87d
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
snapdiff/__init__.py

index 3d02bf25142e519bf8ee57fa1fd284eea92c860d..8d24e6a8b667f16e5630c72585097b0c4fb1ca3b 100644 (file)
@@ -93,6 +93,7 @@ def diff_to_json(old_url, new_url, **kwargs):
                             yield (old_pkg, new_pkg)
                             old[name].remove(old_pkg)
                             new[name].remove(new_pkg)
+                            break
                 for pair in izip_longest(old[name], new[name]):
                     yield pair
     for old_pkg, new_pkg in _pair_old_new():