19 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
19 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
20 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
20 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
21 |
21 |
22 from twisted.python import log |
22 from twisted.python import log |
23 |
23 |
|
24 import os.path |
24 from ConfigParser import ConfigParser |
25 from ConfigParser import ConfigParser |
25 import signal |
26 import signal |
26 from functools import partial |
27 from functools import partial |
27 try: |
28 try: |
28 from collections import OrderedDict |
29 from collections import OrderedDict |
203 signal.signal(signal.SIGUSR2,rC) |
204 signal.signal(signal.SIGUSR2,rC) |
204 |
205 |
205 configParser = MyConfigParser() |
206 configParser = MyConfigParser() |
206 """configParser to get configuration.""" |
207 """configParser to get configuration.""" |
207 |
208 |
208 confFiles=["~/iro.conf","/etc/iro/iro.conf"] |
209 confFiles=["iro.conf", os.path.expanduser("~/.iro.conf"),"/etc/iro/iro.conf"] |
209 """Configfile list """ |
210 """Configfile list """ |
210 |
211 |
211 main_options = OrderedDict([ |
212 main_options = OrderedDict([ |
212 ("dburl",Option(lambda x,y:x,long="Connection URL to database",must=True)), |
213 ("dburl",Option(lambda x,y:x,long="Connection URL to database",must=True)), |
213 ("port",Option(partial(vInteger,minv=0),long="Port under that twisted is running",must=True)), |
214 ("port",Option(partial(vInteger,minv=0),long="Port under that twisted is running",must=True)), |