<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Apr 28, 2014 at 1:23 PM, Paul Eggleton <span dir="ltr"><<a href="mailto:paul.eggleton@linux.intel.com" target="_blank">paul.eggleton@linux.intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Saturday 26 April 2014 16:32:18 Jacob Kroon wrote:<br>
> Cleanup the fix done in f9416e76e272ba3249abff099f6f3a47fe82e03e.<br>
><br>
> Instead of adding continue statements we can just move the last<br>
> statements into the final else-clause.<br>
><br>
> Signed-off-by: Jacob Kroon <<a href="mailto:jacob.kroon@mikrodidakt.se">jacob.kroon@mikrodidakt.se</a>><br>
> ---<br>
> lib/bb/fetch2/__init__.py | 7 ++-----<br>
> 1 file changed, 2 insertions(+), 5 deletions(-)<br>
><br>
> diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py<br>
> index 5a03a0e..bc4e8fd 100644<br>
> --- a/lib/bb/fetch2/__init__.py<br>
> +++ b/lib/bb/fetch2/__init__.py<br>
> @@ -985,15 +985,12 @@ def get_file_checksums(filelist, pn):<br>
> checksum = checksum_file(f)<br>
> if checksum:<br>
> checksums.append((f, checksum))<br>
<br>
</div>Note the above, then see below.<br>
<div class=""><br>
> - continue<br>
> elif os.path.isdir(pth):<br>
> checksums.extend(checksum_dir(pth))<br>
> - continue<br>
> else:<br>
> checksum = checksum_file(pth)<br>
> -<br>
> - if checksum:<br>
> - checksums.append((pth, checksum))<br>
> + if checksum:<br>
> + checksums.append((pth, checksum))<br>
><br>
> checksums.sort(key=operator.itemgetter(1))<br>
> return checksums<br>
<br>
</div>This cleanup seems innocuous but unfortunately it does cause a change in<br>
behaviour - now for the glob case we will get the last item duplicated because<br>
it will be added to the list a second time at the end.<br>
<br></blockquote><br></div><div class="gmail_quote">Sorry..<br>But I can't see why this would cause a different behaviour. Both previous 'continue' statements applied to the outer for-loop. Unless they have an effect on the if-statements aswell ?<br>
</div></div></div>