擅长:python、mysql、java
<p>简化它的一种方法是识别和排除重复:</p>
<pre><code>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()
</code></pre>