[Piglit] [PATCH v2 1/1] framework: change one missed core.checkDir call to core.check_dir

Dylan Baker dylan at pnwbakers.com
Thu Mar 22 17:16:48 UTC 2018


Quoting Petri Latvala (2018-03-22 04:16:29)
> Commit 5e699e402a8b ("framework: rename core.checkDir to
> core.check_dir") missed one call to checkDir in summary/feature. Also
> convert the exception raised to PiglitFatalError.
> 
> v2: Added exception changes
> 
> Signed-off-by: Petri Latvala <petri.latvala at intel.com>
> Cc: Dylan Baker <dylan at pnwbakers.com>
> Cc: Jari Tahvanainen <jari.tahvanainen at intel.com>
> ---
>  framework/programs/summary.py | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/framework/programs/summary.py b/framework/programs/summary.py
> index c6f616dc8..3c21e5bf7 100644
> --- a/framework/programs/summary.py
> +++ b/framework/programs/summary.py
> @@ -307,6 +307,12 @@ def feature(input_):
>          shutil.rmtree(args.summaryDir)
>  
>      # If the requested directory doesn't exist, create it or throw an error
> -    core.checkDir(args.summaryDir, not args.overwrite)
> +    try:
> +        core.check_dir(args.summaryDir, not args.overwrite)
> +    except exceptions.PiglitException:
> +        raise exceptions.PiglitFatalError(
> +                        '{} already exists.\n'
> +                        'use -o/--overwrite if you want to overwrite it.'.format(
> +                            args.summaryDir))

This indent looks very strange, are you using tabs instead of spaces by chance?

>  
>      summary.feat(args.resultsFiles, args.summaryDir, args.featureFile)
> -- 
> 2.14.1
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20180322/b0fda388/attachment.sig>


More information about the Piglit mailing list