<div dir="ltr">

<p style="margin:0px;text-indent:0px">Hi,<br></p><p style="margin:0px;text-indent:0px"><br></p><p style="margin:0px;text-indent:0px">when analyzed with Pylint [1, 2] the function set_paths() in grass.py [3] triggers an unused variable warning in the following block of code:<br></p><p style="margin:0px;text-indent:0px"><br></p><p style="margin:0px;text-indent:0px">addon_path = os.getenv('GRASS_ADDON_PATH')</p>
<p style="margin:0px;text-indent:0px">if addon_path:</p><p style="margin:0px;text-indent:0px">    for path in addon_path.split(os.pathsep):</p>
<p style="margin:0px;text-indent:0px">                    path_prepend(addon_path, 'PATH')</p><p style="margin:0px;text-indent:0px"><br></p><p style="margin:0px;text-indent:0px">Is this an intention or a mistake?</p><p style="margin:0px;text-indent:0px"><br></p><p style="margin:0px;text-indent:0px">I would say that a mistake but since I don't remember any complains about not working addons with multiple paths (which, I think, happens when you run script from GUI). Actually, now I remember that I might have seen addon paths duplicated in the PATH variable which is exactly what the code does.<br></p><p style="margin:0px;text-indent:0px"><br></p><p style="margin:0px;text-indent:0px">Thanks,<br></p><p style="margin:0px;text-indent:0px">Vaclav<br></p><p style="margin:0px;text-indent:0px"><br></p><p style="margin:0px;text-indent:0px">[1] <a href="http://grasswiki.osgeo.org/wiki/Tools_for_Python_programming" target="_blank">http://grasswiki.osgeo.org/wiki/Tools_for_Python_programming</a></p><p style="margin:0px;text-indent:0px">[2] <a href="http://trac.osgeo.org/grass/browser/grass/trunk/tools/pylintrc.txt" target="_blank">http://trac.osgeo.org/grass/browser/grass/trunk/tools/pylintrc.txt</a><br></p><p style="margin:0px;text-indent:0px">[3] <a href="https://trac.osgeo.org/grass/browser/grass/trunk/lib/init/grass.py#L503" target="_blank">https://trac.osgeo.org/grass/browser/grass/trunk/lib/init/grass.py#L503</a></p></div>