except ImportError is too broad: Volatility may be installed but there may be a sub-dependancy itself that isn't resolved.
Make a friendlier error message if a nested dependancy is missing (Crypto.Hash):
The python-crypto package is not installed.
>>> import volatility.plugins.getsids as sidm
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/volatility-2.4-py2.7.egg/volatility/plugins/getsids.py", line 33, in <module>
import volatility.plugins.registry.registryapi as registryapi
File "/usr/lib/python2.7/site-packages/volatility-2.4-py2.7.egg/volatility/plugins/registry/registryapi.py", line 31, in <module>
import volatility.win32.hashdump as hashdump
File "/usr/lib/python2.7/site-packages/volatility-2.4-py2.7.egg/volatility/win32/hashdump.py", line 32, in <module>
from Crypto.Hash import MD5, MD4
ImportError: No module named Crypto.Hash
Although the commit above only handles this one particular import exception (there are probably a couple more) this should be a good start. Going to close this one year old request :-)
except ImportError is too broad: Volatility may be installed but there may be a sub-dependancy itself that isn't resolved. Make a friendlier error message if a nested dependancy is missing (Crypto.Hash): The python-crypto package is not installed.