comparison twisted/plugins/libervia.py @ 421:39b07289ff42

server_side: added parameter port_https_ext (external port for HTTPS, used for example for the redirection)
author souliane <souliane@mailoo.org>
date Tue, 25 Mar 2014 16:09:12 +0100
parents 2bd609d7dd65
children 8ecc5a7062e4
comparison
equal deleted inserted replaced
420:ac0018e4391b 421:39b07289ff42
46 - use the values from SàT configuration files 46 - use the values from SàT configuration files
47 - use the values passes on the command line 47 - use the values passes on the command line
48 If you do it later: after the command line options have been parsed, there's no good way to know 48 If you do it later: after the command line options have been parsed, there's no good way to know
49 if the options values are the hard-coded ones or if they have been passed on the command line. 49 if the options values are the hard-coded ones or if they have been passed on the command line.
50 """ 50 """
51 config = SafeConfigParser()
52 config.read(Const.CONFIG_FILES)
51 for index in xrange(0, len(self.optParameters)): 53 for index in xrange(0, len(self.optParameters)):
52 name = self.optParameters[index][0] 54 name = self.optParameters[index][0]
53 try: 55 try:
54 value = config.get('libervia', name) 56 value = config.get('libervia', name)
55 self.optParameters[index][2] = self.optParameters[index][4](value) 57 self.optParameters[index][2] = self.optParameters[index][4](value)
65 options = Options 67 options = Options
66 68
67 def makeService(self, options): 69 def makeService(self, options):
68 return Libervia(**dict(options)) # get rid of the usage.Option overload 70 return Libervia(**dict(options)) # get rid of the usage.Option overload
69 71
70 config_path = save_config_path('sat')
71 config = SafeConfigParser()
72 config.read(Const.CONFIG_FILES)
73 72
73 # affectation to some variable is necessary for twisted introspection to work
74 serviceMaker = LiberviaMaker() 74 serviceMaker = LiberviaMaker()