<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 28, 2015 at 6:11 AM, Ming Liu <span dir="ltr">&lt;<a href="mailto:liu.ming50@gmail.com" target="_blank">liu.ming50@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":vt" class="a3s" style="overflow:hidden">+                    if urldata.parm.get(&#39;subdir&#39;) != None:<br>
+                        destdir = urldata.parm.get(&#39;subdir&#39;) + &quot;/&quot; + destdir</div></blockquote></div><br>If you really care about the difference between None and the empty string, then this should be &#39;is not None&#39;, not &#39;!= None&#39;, but most likely you don&#39;t, in which case &#39;if urldata.parm.get(&#39;subdir&#39;)&#39; is sufficient, and cleaner. Also you do the parm.get() twice, it may be better to store that in a variable.<br>-- <br><div class="gmail_signature">Christopher Larson<br>clarson at kergoth dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Maintainer - Tslib<br>Senior Software Engineer, Mentor Graphics</div>
</div></div>