Hi,
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:
addon_path = os.getenv(‘GRASS_ADDON_PATH’)
if addon_path:
for path in addon_path.split(os.pathsep):
path_prepend(addon_path, ‘PATH’)
Is this an intention or a mistake?
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.
Thanks,
Vaclav
[1] http://grasswiki.osgeo.org/wiki/Tools_for_Python_programming
[2] http://trac.osgeo.org/grass/browser/grass/trunk/tools/pylintrc.txt
[3] https://trac.osgeo.org/grass/browser/grass/trunk/lib/init/grass.py#L503