Ticket #580 (closed defect: fixed)
__path__ value is cached so __init__ files cannot change their own __path__ value
|Reported by:||ikelos||Owned by:||giovannibajo|
In the course of developing volatility, we make use of a plugin mechanism  that sets the volatility.plugins.path value to a list of directories from which plugins can be loaded. These are later manually traversed and all imports made using import .
When packaging up the most recent version using both 1.5.1 and the dev branch we found that changes made to the path variable were not being seen, and delving within the code this appeared to be because the iu.ImportLoader? caches the path variable as part of the ImportDirector? and therefore after the first import this never changed.
I've attached a patch below that appears to remedy the problem, but the internals of the loader are quite complex, and I had to use im_self to recover the object that needed updating. As such any help/advice on this patch would be much appreciated...