[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #8055 [Ooni]: Convert config file to be a singleton instance
#8055: Convert config file to be a singleton instance
-----------------------------+----------------------------------------------
Reporter: hellais | Owner: hellais
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Ooni | Version:
Keywords: ooni, ooni_easy | Parent:
Points: | Actualpoints:
-----------------------------+----------------------------------------------
The config.py currently uses some hacks to make sure that it does not get
instanced twice. What we should actually be using is a metaclass
constructor that looks like the one evilaliv3 wrote for GlobaLeaks.
This is the class:
https://github.com/globaleaks/GLBackend/blob/c900929c8893ed5da47ea057845dfce486f25a26/globaleaks/utils/singleton.py
And this is how it's used:
https://github.com/globaleaks/GLBackend/blob/c900929c8893ed5da47ea057845dfce486f25a26/globaleaks/config.py#L56
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/8055>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs