MD5 compatibility fixes (was: [SCM] Samba Shared Repository - branch master updated)

Jelmer Vernooij jelmer at samba.org
Sat Dec 8 05:44:43 MST 2012


On Sat, Dec 08, 2012 at 01:31:03PM +0100, Andreas Schneider wrote:
> Changeset truncated at 500 lines:
> 
> diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py
> index c1869df..cab87a4 100644
> --- a/buildtools/wafsamba/samba_utils.py
> +++ b/buildtools/wafsamba/samba_utils.py
> @@ -388,9 +388,17 @@ def RUN_COMMAND(cmd,
>  # make sure we have md5. some systems don't have it
>  try:
>      from hashlib import md5
> +    try:
> +        foo = md5.md5('abcd')
> +    except ValueError:
> +        raise
This looks really odd - what does the 'except ValueError: ; raise' bit do?
Wouldn't the behaviour of this code be the same without it?

>  except:
>      try:
>          import md5
> +        try:
> +            foo = md5.md5('abcd')
> +        except ValueError:
> +            raise

Cheers,

Jelmer


More information about the samba-technical mailing list