Skip to content

Commit

Permalink
Merge pull request ajenti#33 from egelmex/master
Browse files Browse the repository at this point in the history
Fix spacing
  • Loading branch information
Eugeny committed Feb 11, 2012
2 parents 5128605 + f510b23 commit c2c7265
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions plugins/network/nc_arch.py
Expand Up @@ -35,24 +35,24 @@ def rescan(self):
value = self.rcconf.get_param(key)
if key == 'address':
iface.addressing = 'dhcp' if value == '' else 'static'
iface.params[key] = value
iface.params[key] = value

iface.devclass = self.detect_dev_class(iface)
iface.up = shell_status('ifconfig ' + iface.name + '|grep UP') == 0
iface.get_bits(self.app, self.detect_iface_bits(iface))
iface.devclass = self.detect_dev_class(iface)
iface.up = shell_status('ifconfig ' + iface.name + '|grep UP') == 0
iface.get_bits(self.app, self.detect_iface_bits(iface))
else:
s = shell('ip -o link list')
for line in s.split('\n'):
line = line.strip()
if line != '':
name = line.split(':')[1].strip()
iface = NetworkInterface()
iface.name = name
self.interfaces[name] = iface
iface.devclass = self.detect_dev_class(iface)
iface.up = (line.find('state UP') != -1)
iface.get_bits(self.app, self.detect_iface_bits(iface))
iface.editable = False
for line in s.split('\n'):
line = line.strip()
if line != '':
name = line.split(':')[1].strip()
iface = NetworkInterface()
iface.name = name
self.interfaces[name] = iface
iface.devclass = self.detect_dev_class(iface)
iface.up = (line.find('state UP') != -1)
iface.get_bits(self.app, self.detect_iface_bits(iface))
iface.editable = False


def save(self):
Expand Down

0 comments on commit c2c7265

Please sign in to comment.