Closed GoogleCodeExporter closed 8 years ago
Ikelos, do you have any thoughts?
Original comment by michael.hale@gmail.com
on 17 Mar 2014 at 7:06
Hiya, I'm afraid the ConfObject was taken from PyFLAG (as the header attests)
and will always read from the command line.
The best options available are to either subclass this and override the
parse_args function, or copy the code from there and try to use it directly.
It's not an ideal solution, but unfortunately, that's the way the codebase
currently works.
Another possible workaround would be to temporarily stash sys.argv in a
different variable, set it to [] before calling parse_options, then reset it
afterwards so that your code will still see the original command line, whilst
volatility will only see the blank commandline...
I hope one of those works, sorry we didn't envisage this use case when we first
made the config system.
Original comment by mike.auty@gmail.com
on 20 Mar 2014 at 8:25
setting sys.argv = [] after processing the main script's args and before
creating the volatility conf.ConfObject() seems to work fine. thanks mike!
Original comment by michael.hale@gmail.com
on 27 Mar 2014 at 4:14
Original issue reported on code.google.com by
crazydah...@gmail.com
on 14 Mar 2014 at 3:49