[tor-bugs] #4913 [Stem]: Add stem.util.conf.Config.save()
Tor Bug Tracker & Wiki
torproject-admin at torproject.org
Mon Jan 16 03:57:08 UTC 2012
#4913: Add stem.util.conf.Config.save()
-------------------------+--------------------------------------------------
Reporter: gsathya | Owner: atagar
Type: enhancement | Status: needs_review
Priority: normal | Milestone:
Component: Stem | Version:
Keywords: | Parent:
Points: | Actualpoints:
-------------------------+--------------------------------------------------
Comment(by gsathya):
Ok I think we need a different approach. Config.get() returns only the
last updated value if I pass Multiple=False.
So in case we have a config file like -
{{{
startup.run export PATH=$PATH:~/bin
startup.run alias l=ls
}}}
We'd only be writing {{{ startup.run alias l=ls }}} into the config file
and {{{ startup.run export PATH=$PATH:~/bin }}} would get pruned.
On the other hand, if we pass Multiple = True, we'd get a list of values
which we dont need like {{{ login.password -> ["foo", "bar", "fubar"] }}}.
In this case we only need {{{ login.password -> ["foo"] }}}
We can fix this by storing only multiple values and overwriting the old
ones.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/4913#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list