Closed meejah closed 11 years ago
Imho it's important that when you do a "save()" you are later able to retrieve the config structure without having to save it to a file.
For example GlobaLeaks, based on APAF based on txtorcon, plan to keep all it's data to an encrypted sqlcipher db and at runtime extract the files required for it's components and dependencies (such as tor).
save() doesn't write it to a file. Perhaps I should rename the method, but if there's a connected .protocol save() writes the files to the running Tor. After that it puts them in the self.config hashtable (instead of "unsaved").
In any case, the config structure is always in the .config hashtable.
You can get a torrc-like file by calling "create_torrc()", which also doesn't write a file (it returns a string). Nothing in TorConfig writes to files.
fixed, with test
If one passes in a config object to launch_tor, it is not hooked up properly to the TorControlProtocol object that is speaking to the Tor which got launched. Needs test-case and code fix.