[Piglit] [PATCH] generated_tests: Except error for os.makedirs

Mark Janes mark.a.janes at intel.com
Fri Dec 12 09:47:35 PST 2014


Thanks  for making this fix.

Dylan Baker <baker.dylan.c at gmail.com> writes:
> -            os.makedirs(dirname)
> +            try:
> +                os.makedirs(dirname)
> +            except OSError as e:
> +                if e.errno == 17:  # file exists
> +                    pass
> +                raise

This works for me, but I think it might be more portable if you compare
to errno.EEXIST.  

-Mark


More information about the Piglit mailing list