[tor-bugs] #8055 [Ooni]: Convert config file to be a singleton instance

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Jan 25 12:36:27 UTC 2013


#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


More information about the tor-bugs mailing list