Ejemplo n.º 1
0
 def parse(self, filepath):
     if not os.path.exists(filepath):
         filepath = os.path.join(utils.get_interfaces_path(), DEFAULT_INTERFACE_FILENAME + '.interface')
     try:
         IniFile.parse(self, filepath, ["Interface Entry"])
     except Exception, e:
         print e
Ejemplo n.º 2
0
 def __init__(self, filename=None, udev_object=None):
     self.content = dict()
     self.udev_object = udev_object
     self.parse(os.path.join(utils.get_interfaces_path(), filename + '.interface'))
Ejemplo n.º 3
0
 def new(self, filename):
     self.content = dict()
     self.addGroup(self.default_group)
     self.filename = os.path.join(utils.get_interfaces_path(), filename + '.interface')