It needs to create the directory in the first place to enable caching.. But - If for whatever reason caching fails that should be no reason to blow up and present an error.<div><br></div><div>Its probably worth highlighting this code is in python-novaclient, not horizon. The vast majority of uses cases will be able to cache just fine.<br>

<div><br></div><div>Anyway - The point is - cache if we can, but if we cant, lets not interrupt the user.</div><div><br></div><div>Thanks,<br>Kiall<br>
<br><br><div class="gmail_quote">On Wed, Mar 21, 2012 at 12:42 PM, Kevin Jackson <span dir="ltr"><<a href="mailto:kevin@linuxservices.co.uk">kevin@linuxservices.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

If the code should just ignore the fact it can't create this directory - what is the point of it needing to attempt to create the directory in the first place?  What is its purpose if its superfluous?<div><br></div><div>


<div>try:</div><div>    os.makedirs(cache_dir, 0755)</div><div>except OSError as e:</div><div>     # NOTE(kiall): This is typicaly either permission denied while</div><div>     #              attempting to create the directory, or the directory</div>


<div>     #              already exists. Either way, don't fail.</div><div>     pass</div><div><br></div><div>Cheers,</div><div>Kev</div><div><div class="im"><br><div class="gmail_quote">On 21 March 2012 12:29, Kiall Mac Innes <span dir="ltr"><<a href="mailto:kiall@managedit.ie" target="_blank">kiall@managedit.ie</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This should fix the issue - <a href="https://review.openstack.org/5608" target="_blank">https://review.openstack.org/5608</a><div>


<br></div><div>It duplicates the fix from 5-10 lines below now that the dot files have been moved into a directory.<br clear="all">

<br>Thanks,<br>Kiall<br>
<br></div></blockquote></div></div><span class="HOEnZb"><font color="#888888">-- <br>Kevin Jackson<br>@itarchitectkev<br>
</font></span></div></div>
<br>_______________________________________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
Post to     : <a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
More help   : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br>
<br></blockquote></div><br></div></div>