Leor3961 / volatility

Automatically exported from code.google.com/p/volatility
0 stars 0 forks source link

Path does not exist errors could be handled more gracefully #59

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hey guys, 

Not a big deal, but to prevent lots of annoying emails from users in the 
future, maybe we could make these error messages more graceful?

$ python volatility.py -f nonexistant

Volatile Systems Volatility Framework 1.4_rc1
ERROR   : volatility.plugins.fileparam: The requested file doesn't exist
*** Failed to import volatility.plugins.fileparam (SystemExit: 1)
Traceback (most recent call last):
  File "volatility.py", line 126, in <module>
    main()
  File "volatility.py", line 90, in main
    config.parse_options(False)
  File "/Users/mike/Desktop/Volatility-1.4_r599/volatility/conf.py", line 225, in parse_options
    (opts, args) = self.optparser.parse_args()
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/optparse.py", line 1380, in parse_args
    stop = self._process_args(largs, rargs, values)
  File "/Users/mike/Desktop/Volatility-1.4_r599/volatility/conf.py", line 84, in _process_args
    return optparse.OptionParser._process_args(self, largs, rargs, values)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/optparse.py", line 1424, in _process_args
    self._process_short_opts(rargs, values)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/optparse.py", line 1531, in _process_short_opts
    option.process(opt, value, values, self)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/optparse.py", line 774, in process
    self.action, self.dest, opt, value, values, parser)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/optparse.py", line 794, in take_action
    self.callback(self, opt, value, parser, *args, **kwargs)
  File "/Users/mike/Desktop/Volatility-1.4_r599/volatility/plugins/fileparam.py", line 33, in set_location
    if not os.path.exists(os.path.abspath(value)):
AttributeError: 'NoneType' object has no attribute 'path'

Original issue reported on code.google.com by michael.hale@gmail.com on 19 Jan 2011 at 3:03