[OE-core] [PATCH] license: Improve disk usage

Burton, Ross ross.burton at intel.com
Mon Sep 15 15:03:03 UTC 2014


On 15 September 2014 15:47, Mike Looijmans <mike.looijmans at topic.nl> wrote:
> It's just that the try/except version will always work on any system,
> whereas the device comparison may fail on some setups. And given the habit
> of programmers to copy these things from other locations, chances are that a
> device comparison will some day be used on the "downloads" directory which
> is FAT on my system.
>
> Also, when the copy fails, the resulting message should be clearer, as the
> "copyfile" call will be in the stacktrace.

I believe this is called the "try and ask forgiveness" pattern.  It's
race-free, too.

Ross



More information about the Openembedded-core mailing list