I have 4 variables, some of them will be True and False, and for each combinations, i will have to call one or few functions. i am currently using a if else statement for ea
One way to simplify it would be to recognise and factor out the duplication:
if self.phone:
if self.isp() == "east":
self.launchbell()
else:
self.launchtelus()
if self.cpe_ip and self.cpe_passwd:
print 'check modem...'
self.modemstatus()
if self.pppoe:
radius = sgp_radius.Radius(self.pppoe)
print 'check radius logs...'
self.data = radius.sgp()
self.radius_save()