removed @property functions

This commit is contained in:
Frederic 2017-04-28 18:48:22 +02:00
parent 937ac41eac
commit c21b6f9e96
2 changed files with 9 additions and 37 deletions

View file

@ -22,10 +22,9 @@ class ConfigurationReader(object):
def __init__(self):
self.__cp = ConfigParser.ConfigParser(defaults=ConfigurationReader.DEFAULTS)
self.__pinconfig = None
self.__dialconfig = None
self.__proxyconfigs = None
self.__phoneconfig = None
self.pinconfig = None
self.dialconfig = None
self.phoneconfig = None
def __get_global_val(self, option):
@ -69,7 +68,7 @@ class ConfigurationReader(object):
self.__cp.read(f)
print 'pin_nsa:', self.__get_global_val_int('pin_nsa'),
self.__pinconfig = apparatinterface.FeApPinConfiguration(
self.pinconfig = apparatinterface.FeApPinConfiguration(
gpio_numbering = self.__get_global_val('gpio_numbering'),
pin_nsa = self.__get_global_val_int('pin_nsa'),
pin_nsi = self.__get_global_val_int('pin_nsi'),
@ -81,7 +80,7 @@ class ConfigurationReader(object):
invert_gs = self.__get_global_val_bool('invert_gs'),
)
self.__dialconfig = statemachine.DialConfiguration(
self.dialconfig = statemachine.DialConfiguration(
self.__get_global_val_int('dial_timeout'),
self.__read_shortcuts(),
self.__read_blacklist(),
@ -102,7 +101,7 @@ class ConfigurationReader(object):
)
proxyconfigs.append(proxyconfig)
self.__phoneconfig = phoneinterface.PhoneConfiguration(
self.phoneconfig = phoneinterface.PhoneConfiguration(
sound_device = self.__get_global_val('sound_device'),
incoming_timeout = self.__get_global_val_int('incoming_timeout'),
linphone_config = self.__get_global_val('linphone_config'),
@ -111,18 +110,3 @@ class ConfigurationReader(object):
proxies = proxyconfigs
)
@property
def pinconfig(self):
return self.__pinconfig
@property
def dialconfig(self):
return self.__dialconfig
@property
def phoneconfig(self):
return self.__phoneconfig

View file

@ -259,9 +259,9 @@ class DialingState(BaseState):
class StateMachineController(object):
def __init__(self, phone, feap, dialconfig):
self.__phone = phone
self.__feap = feap
self.__dialconfig = dialconfig
self.phone = phone
self.feap = feap
self.dialconfig = dialconfig
self.__state = InitState(self)
@ -308,18 +308,6 @@ class StateMachineController(object):
self.__timeout.cancel()
self.__timeout = None
@property
def phone(self):
return self.__phone
@property
def feap(self):
return self.__feap
@property
def dialconfig(self):
return self.__dialconfig
def stop(self, hard=False):
if hard:
self.__running = False