iNetwork.msgPlugins()
iNetwork.getInterfaces()
+ def checkIfaceMode(self, iface = None):
+ try:
+ obj = Wireless(iface)
+ if obj.getMode() == 'Master':
+ return -1
+ else:
+ return 0
+ except:
+ return -2
+
def ok(self):
# print len(self["menulist"].list)
if len(self["menulist"].list) == 0:
self.session.open(MessageBox, (_("Can not find any WirelessLan Module\n")),MessageBox.TYPE_ERROR,5 )
return
- ifaces=self["menulist"].getCurrent()[1]
- if ifaces == None:
- pass
- else:
- self.session.open(WlanSetup,ifaces)
+ iface=self["menulist"].getCurrent()[1]
+ if iface == None:
+ return
+ elif iNetwork.getAdapterAttribute(iface, "up") == True:
+ ret = self.checkIfaceMode(iface)
+ if ret == -2:
+ self.session.open(MessageBox, (_("Invalid WirelessLan Module.\n")),MessageBox.TYPE_ERROR,5 )
+ return
+ elif ret == -1:
+ self.session.open(MessageBox, (_("Can not setup WirelessLan Module in 'AP Mode'\n")),MessageBox.TYPE_ERROR,5 )
+ return
+ self.session.open(WlanSetup, iface)
def getWlandevice(self):
list = []
for x in iNetwork.getInstalledAdapters():
- if x.startswith('eth'):
+ if x.startswith('eth') or x.startswith('br') or x.startswith('mon'):
continue
description=self.getAdapterDescription(x)
if description == "Unknown network adapter":
menu = []
menu.append((_("Adapter settings"), "setting"))
menu.append((_("Scan Wireless AP"), "scanap"))
- menu.append((_("Nameserver settings"), "dns"))
+# menu.append((_("Nameserver settings"), "dns"))
if iNetwork.getAdapterAttribute(self.iface, "up"):
menu.append((_("Show WLAN Status"), "status"))
menu.append((_("Network test"), "test"))
<widget source="key_red" render="Label" position="10,360" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" foregroundColor="#ffffff" transparent="1" />
<widget source="key_green" render="Label" position="360,360" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" foregroundColor="#ffffff" transparent="1" />
- <widget name="config" position="10,10" backgroundColor="#371e1c1a" transparent="1" size="480,210" scrollbarMode="showOnDemand" />
- <ePixmap pixmap="skin_default/div-h.png" position="0,225" zPosition="1" size="550,2" />
- <eLabel text="IP Address : " position="100,250" size="190,21" font="Regular;19" />
- <widget source="ipaddress" render="Label" position="300,250" zPosition="1" size="150,26" font="Regular;20" halign="center" valign="center" />
- <eLabel text="NetMask : " position="100,275" size="190,21" font="Regular;19" />
- <widget source="netmask" render="Label" position="300,275" zPosition="1" size="150,26" font="Regular;20" halign="center" valign="center" />
- <eLabel text="Gateway : " position="100,300" size="190,21" font="Regular;19" />
- <widget source="gateway" render="Label" position="300,300" zPosition="1" size="150,26" font="Regular;20" halign="center" valign="center" />
+ <widget name="config" position="10,10" backgroundColor="#371e1c1a" transparent="1" size="480,195" scrollbarMode="showOnDemand" />
+ <ePixmap pixmap="skin_default/div-h.png" position="0,210" zPosition="1" size="560,2" />
+ <widget source="ipaddresstext" render="Label" position="100,220" zPosition="1" size="190,21" font="Regular;19" halign="Left" valign="center" />
+ <widget source="ipaddress" render="Label" position="300,220" zPosition="1" size="150,26" font="Regular;20" halign="Left" valign="center" />
+ <widget source="netmasktext" render="Label" position="100,245" zPosition="1" size="190,21" font="Regular;19" halign="Left" valign="center" />
+ <widget source="netmask" render="Label" position="300,245" zPosition="1" size="150,26" font="Regular;20" halign="Left" valign="center" />
+ <widget source="gatewaytext" render="Label" position="100,270" zPosition="1" size="190,21" font="Regular;19" halign="Left" valign="center" />
+ <widget source="gateway" render="Label" position="300,270" zPosition="1" size="150,26" font="Regular;20" halign="Left" valign="center" />
+ <widget source="DNS1text" render="Label" position="100,295" zPosition="1" size="190,21" font="Regular;19" halign="Left" valign="center" />
+ <widget source="DNS1" render="Label" position="300,295" zPosition="1" size="150,26" font="Regular;20" halign="Left" valign="center" />
+ <widget source="DNS2text" render="Label" position="100,320" zPosition="1" size="190,21" font="Regular;19" halign="Left" valign="center" />
+ <widget source="DNS2" render="Label" position="300,320" zPosition="1" size="150,26" font="Regular;20" halign="Left" valign="center" />
+ <widget name="VKeyIcon" pixmap="skin_default/buttons/key_text.png" position="460,230" zPosition="10" size="35,25" transparent="1" alphatest="on" />
+ <widget name="HelpWindow" pixmap="skin_default/buttons/key_text.png" position="383,420" zPosition="1" size="1,1" transparent="1" alphatest="on" />
</screen>
"""
def __init__(self, session, iface, essidSelected = None):
self.session = session
self["key_red"] = StaticText(_("Close"))
self["key_green"] = StaticText(_("Ok"))
+ self["ipaddresstext"] = StaticText(_("IP Address"))
self["ipaddress"] = StaticText(_("[ N/A ]"))
- self["netmask"] = StaticText(_("[ N/A ]"))
+ self["netmasktext"] = StaticText(_("NetMask"))
+ self["netmask"] = StaticText(_("[ N/A ]"))
+ self["gatewaytext"] = StaticText(_("Gateway"))
self["gateway"] = StaticText(_("[ N/A ]"))
+ self["DNS1text"] = StaticText(_("Primary DNS"))
+ self["DNS1"] = StaticText(_("[ N/A ]"))
+ self["DNS2text"] = StaticText(_("Secondary DNS"))
+ self["DNS2"] = StaticText(_("[ N/A ]"))
self["OkCancelActions"] = ActionMap(["ShortcutActions", "SetupActions" ],
{
"ok": self.saveWlanConfig,
"cancel": self.keyCancel,
"red": self.keyCancel,
}, -2)
+ self["HelpWindow"] = Pixmap()
+ self["HelpWindow"].hide()
+ self["VKeyIcon"] = Pixmap()
+ self["VKeyIcon"].hide()
self.iface = iface
self.essidSelected = essidSelected
self.ssid = None
self.readWpaSupplicantConf()
self.scanAplistTimer = eTimer()
self.scanAplistTimer.callback.append(self.scanApList)
+ self.emptyListMsgTimer = eTimer()
+ self.emptyListMsgTimer.callback.append(self.emptyListMsg)
self.Console = Console()
self.updateInterfaces(self.readWlanSettings)
self.onClose.append(self.cleanup)
default_tmp = "off"
wlanconfig.usedhcp = ConfigSelection(default=default_tmp, choices = [("off", _("no")), ("on", _("yes"))])
+ if iNetwork.getAdapterAttribute(self.iface, "dns-nameservers"):
+ self.dnsconfigdefault="on"
+ else:
+ self.dnsconfigdefault="off"
+ wlanconfig.hasdnsconfigentry = ConfigSelection(default=self.dnsconfigdefault, choices = [("off", _("no")), ("on", _("yes"))])
+
wlanconfig.ip = ConfigIP(default=iNetwork.getAdapterAttribute(self.iface, "ip")) or [0,0,0,0]
wlanconfig.netmask = ConfigIP(default=iNetwork.getAdapterAttribute(self.iface, "netmask") or [255,0,0,0])
self["netmask"].setText(_(self.formatip(iNetwork.getAdapterAttribute(self.iface, "netmask"))))
self["gateway"].setText(_(self.formatip(iNetwork.getAdapterAttribute(self.iface, "gateway"))))
+ nameserver = (iNetwork.getNameserverList() + [[0,0,0,0]] * 2)[0:2]
+ self.primaryDNS = NoSave(ConfigIP(default=nameserver[0]))
+ self.secondaryDNS = NoSave(ConfigIP(default=nameserver[1]))
+ self["DNS1"].setText(self.primaryDNS.getText())
+ self["DNS2"].setText(self.secondaryDNS.getText())
+
if self.encryption_key is not None:
default_tmp = "on"
else:
self.usegatewayEntry = getConfigListEntry(_("Use Gateway"), wlanconfig.usegateway)
self.gatewayEntry = getConfigListEntry(_("Gateway"), wlanconfig.gateway)
+ manualNameservers = (iNetwork.getInterfacesNameserverList(self.iface) + [[0,0,0,0]] * 2)[0:2]
+ self.manualPrimaryDNS = NoSave(ConfigIP(default=manualNameservers[0]))
+ self.manualSecondaryDNS = NoSave(ConfigIP(default=manualNameservers[1]))
+ nameserver = (iNetwork.getNameserverList() + [[0,0,0,0]] * 2)[0:2]
+ self.primaryDNS = NoSave(ConfigIP(default=nameserver[0]))
+ self.secondaryDNS = NoSave(ConfigIP(default=nameserver[1]))
+ self.DNSConfigEntry = getConfigListEntry(_("Use Manual dns-nameserver"), wlanconfig.hasdnsconfigentry)
+ self.primaryDNSConfigEntry = getConfigListEntry(_('Primary DNS'), self.manualPrimaryDNS)
+ self.secondaryDNSConfigEntry = getConfigListEntry(_('Secondary DNS'), self.manualSecondaryDNS)
+
self.configList.append( self.usedeviceEntry )
if wlanconfig.usedevice.value is "on":
self.configList.append( self.usedhcpEntry )
self.configList.append(self.usegatewayEntry)
if wlanconfig.usegateway.value is "on":
self.configList.append(self.gatewayEntry)
+ if wlanconfig.usedhcp.value is "on":
+ self.configList.append(self.DNSConfigEntry)
+ if wlanconfig.hasdnsconfigentry.value is "on" or wlanconfig.usedhcp.value is "off":
+ self.configList.append(self.primaryDNSConfigEntry)
+ self.configList.append(self.secondaryDNSConfigEntry)
+
self.configList.append( self.essidEntry )
if wlanconfig.essid.value == 'Input hidden ESSID':
self.configList.append( self.hiddenessidEntry )
self["config"].list = self.configList
self["config"].l.setList(self.configList)
+ if not self.showTextIcon in self["config"].onSelectionChanged:
+ self["config"].onSelectionChanged.append(self.showTextIcon)
+
+ def showTextIcon(self):
+ if isinstance(self["config"].getCurrent()[1], ConfigText) or isinstance(self["config"].getCurrent()[1], ConfigPassword):
+ self["VKeyIcon"].show()
+ else:
+ self["VKeyIcon"].hide()
def getApList(self):
if self.essidSelected is None:
wlanconfig.hiddenessid = ConfigText(default = "<Input ESSID>", visible_width = 50, fixed_size = False)
self.createConfig()
- def scanApList(self):
+ def getScanResult(self, wirelessObj):
Iwscanresult = None
- wirelessObj = Wireless(self.iface)
try:
Iwscanresult = wirelessObj.scan()
except IOError:
print "%s Interface doesn't support scanning.."%self.iface
- self.session.open(MessageBox, "%s Interface doesn't support scanning.."%self.iface, MessageBox.TYPE_ERROR,10)
- self.configurationmsg.close(True)
- if Iwscanresult is None:
- self.session.open(MessageBox, _("No scan results"), MessageBox.TYPE_ERROR,10)
+ return Iwscanresult
- for ap in Iwscanresult:
- if ap.essid not in self.apList and len(ap.essid) > 0:
- self.apList.append(ap.essid)
+ def scanApList(self):
+ if self.oldInterfaceState is not True:
+ os_system("ifconfig "+self.iface+" up")
+ iNetwork.setAdapterAttribute(self.iface, "up", True)
+ wirelessObj = Wireless(self.iface)
+ Iwscanresult=self.getScanResult(wirelessObj)
+ if Iwscanresult is None or len(Iwscanresult.aplist) == 0 :
+ import time
+ time.sleep(1.5)
+ Iwscanresult=self.getScanResult(wirelessObj)
+ self.configurationmsg.close(True)
+ if Iwscanresult is None or len( Iwscanresult.aplist) == 0:
+ self.emptyListMsgTimer.start(100,True)
+ else:
+ for ap in Iwscanresult:
+ if ap.essid is not None and ap.essid not in self.apList and len(ap.essid) > 0:
+ self.apList.append(ap.essid)
self.apList.append('Input hidden ESSID')
if selectap is not None and selectap in self.apList:
wlanconfig.essid = ConfigSelection(default=selectap,choices = self.apList)
wlanconfig.hiddenessid = ConfigText(default = "<Input ESSID>", visible_width = 50, fixed_size = False)
self.createConfig()
+ def emptyListMsg(self):
+ self.session.open(MessageBox, _("No AP detected."), type = MessageBox.TYPE_INFO, timeout = 10)
+
def keyLeft(self):
ConfigListScreen.keyLeft(self)
self.newConfig()
def newConfig(self):
if self["config"].getCurrent() == self.usedeviceEntry or self["config"].getCurrent() == self.encryptEntry \
or self["config"].getCurrent() == self.usedhcpEntry or self["config"].getCurrent() == self.usegatewayEntry \
- or self["config"].getCurrent() == self.essidEntry or self["config"].getCurrent() == self.methodEntry:
+ or self["config"].getCurrent() == self.essidEntry or self["config"].getCurrent() == self.methodEntry \
+ or self["config"].getCurrent() == self.DNSConfigEntry:
self.createConfig()
def saveWlanConfig(self):
print "content = \n"+contents
wpafd.write(contents)
wpafd.close()
- self.writeNetConfig(0)
+ self.writeNetConfig()
else :
self.session.open(MessageBox, _("wpa_supplicant.conf open error."), type = MessageBox.TYPE_ERROR, timeout = 10)
- self.writeNetConfig(-1)
+ return
else:
- self.writeNetConfig(-2)
-
- def writeNetConfig(self,ret = -1):
- if ret == -1:
- self.session.open(MessageBox, _("wpa_supplicant.conf open error."), type = MessageBox.TYPE_ERROR, timeout = 10)
- return
- elif ret == -2:
self.session.open(MessageBox, _("Can NOT generate passphrase"), type = MessageBox.TYPE_ERROR, timeout = 10)
return
+ def writeNetConfig(self):
if wlanconfig.usedevice.value=="on":
iNetwork.setAdapterAttribute(self.iface, "up", True)
if wlanconfig.usedhcp.value =="on":
iNetwork.setAdapterAttribute(self.iface, "netmask", wlanconfig.netmask.value)
if wlanconfig.usegateway.value == "on":
iNetwork.setAdapterAttribute(self.iface, "gateway", wlanconfig.gateway.value)
+ if wlanconfig.hasdnsconfigentry.value == "on" or wlanconfig.usedhcp.value == "off":
+ interfacesDnsLines = self.makeLineDnsNameservers([self.manualPrimaryDNS.value, self.manualSecondaryDNS.value])
+ if interfacesDnsLines == "" :
+ interfacesDnsLines = False
+ iNetwork.setAdapterAttribute(self.iface, "dns-nameservers", interfacesDnsLines)
+ else:
+ iNetwork.setAdapterAttribute(self.iface, "dns-nameservers", False)
else:
iNetwork.setAdapterAttribute(self.iface, "up", False)
iNetwork.deactivateInterface(self.iface)
contents = "\tpre-up wpa_supplicant -i"+self.iface+" -c/etc/wpa_supplicant.conf -B -D"+iNetwork.detectWlanModule(self.iface)+"\n"
- contents += "\tpost-down wpa_cli terminate\n\n"
+ contents += "\tpost-down wpa_cli terminate\n"
iNetwork.setAdapterAttribute(self.iface, "configStrings", contents)
iNetwork.writeNetworkConfig()
iNetwork.restartNetwork(self.updateCurrentInterfaces)
self.configurationmsg = None
self.configurationmsg = self.session.openWithCallback(self.configFinished, MessageBox, _("Please wait for activation of your network configuration..."), type = MessageBox.TYPE_INFO, enable_input = False)
+ def makeLineDnsNameservers(self, nameservers = []):
+ line = ""
+ entry = ' '.join([("%d.%d.%d.%d" % tuple(x)) for x in nameservers if x != [0, 0, 0, 0] ])
+ if len(entry):
+ line+="\tdns-nameservers %s\n" % entry
+ return line
def updateCurrentInterfaces(self,ret):
if ret is True:
"down": (self.down, _("move down to next entry")),
"left": (self.left, _("move up to first entry")),
"right": (self.right, _("move down to last entry")),
- })
+ }, -2)
self["OkCancelActions"] = HelpableActionMap(self, "OkCancelActions",
{
"blue": (self.startWlanConfig, "Edit Wireless settings"),
})
- self["actions"] = NumberActionMap(["WizardActions","ShortcutActions"],
- {
- "ok": self.ok,
- "back": self.close,
- "up": self.up,
- "down": self.down,
- "red": self.close,
- "left": self.left,
- "right": self.right,
- }, -2)
-
self["menulist"] = MenuList(self.setApList)
self["key_red"] = StaticText(_("Close"))
self["key_green"] = StaticText(_("Select"))
self["Frequency"] = StaticText(" ")
self["Encryption key"] = StaticText(" ")
self["BitRate"] = StaticText(" ")
+ self.oldInterfaceState = iNetwork.getAdapterAttribute(self.iface, "up")
self.getAplistTimer = eTimer()
self.getAplistTimer.callback.append(self.getApList)
self.scanAplistTimer = eTimer()
self.scanAplistTimer.callback.append(self.scanApList)
+ self.emptyListMsgTimer = eTimer()
+ self.emptyListMsgTimer.callback.append(self.emptyListMsg)
self.apList = {}
+ self.onClose.append(self.__onClose)
self.getAplistTimer.start(100,True)
def left(self):
def ok(self):
global selectap
- selectAp=self["menulist"].getCurrent()[0]
- selectap = selectAp
+ if self["menulist"].getCurrent() is not None:
+ selectAp=self["menulist"].getCurrent()[0]
+ selectap = selectAp
self.close()
def startWlanConfig(self):
- selectAp=self["menulist"].getCurrent()[0]
- self.close(selectAp)
+ if self["menulist"].getCurrent() is not None:
+ selectAp=self["menulist"].getCurrent()[0]
+ self.close(selectAp)
def getApList(self):
self.apList = {}
self.configurationmsg = self.session.open(MessageBox, _("Please wait for scanning AP..."), type = MessageBox.TYPE_INFO, enable_input = False)
self.scanAplistTimer.start(100,True)
- def scanApList(self):
+ def getScanResult(self, wirelessObj):
Iwscanresult = None
- wirelessObj = Wireless(self.iface)
try:
Iwscanresult = wirelessObj.scan()
except IOError:
print "%s Interface doesn't support scanning.."%self.iface
- self.session.open(MessageBox, "%s Interface doesn't support scanning.."%self.iface, MessageBox.TYPE_ERROR,10)
- self.configurationmsg.close(True)
- if Iwscanresult is None:
- self.session.open(MessageBox, _("No scan results"), MessageBox.TYPE_ERROR,10)
-
- (num_channels, frequencies) = wirelessObj.getChannelInfo()
- index = 1
- for ap in Iwscanresult:
- self.apList[index] = {}
- self.apList[index]["Address"] = ap.bssid
- if len(ap.essid) == 0:
- self.apList[index]["ESSID"] = "<hidden ESSID>"
- else:
- self.apList[index]["ESSID"] = ap.essid
- self.setApList.append( (self.apList[index]["ESSID"], index) )
- self.apList[index]["Protocol"] = ap.protocol
- self.apList[index]["Frequency"] = wirelessObj._formatFrequency(ap.frequency.getFrequency())
- try:
- self.apList[index]["Channel"] = frequencies.index(self.apList[index]["Frequency"] + 1)
- except:
- self.apList[index]["Channel"] = "Unknown"
+ return Iwscanresult
- self.apList[index]["Quality"] = "%s/%s" % \
- ( ap.quality.quality, wirelessObj.getQualityMax().quality )
- self.apList[index]["Signal Level"] = "%s/%s" % \
- ( ap.quality.getSignallevel(), "100" )
- self.apList[index]["Noise Level"] = "%s/%s" % \
- ( ap.quality.getNoiselevel(), "100" )
+ def scanApList(self):
+ if self.oldInterfaceState is not True:
+ os_system("ifconfig "+self.iface+" up")
+ iNetwork.setAdapterAttribute(self.iface, "up", True)
+ wirelessObj = Wireless(self.iface)
+ Iwscanresult=self.getScanResult(wirelessObj)
+ if Iwscanresult is None or len(Iwscanresult.aplist) == 0 :
+ import time
+ time.sleep(1.5)
+ Iwscanresult=self.getScanResult(wirelessObj)
+ self.configurationmsg.close(True)
+ if Iwscanresult is not None and len(Iwscanresult.aplist) != 0:
+ (num_channels, frequencies) = wirelessObj.getChannelInfo()
+ index = 1
+ for ap in Iwscanresult:
+ self.apList[index] = {}
+ self.apList[index]["Address"] = ap.bssid
+ if len(ap.essid) == 0:
+ self.apList[index]["ESSID"] = "<hidden ESSID>"
+ else:
+ self.apList[index]["ESSID"] = ap.essid
+ self.setApList.append( (self.apList[index]["ESSID"], index) )
+ self.apList[index]["Protocol"] = ap.protocol
+ self.apList[index]["Frequency"] = wirelessObj._formatFrequency(ap.frequency.getFrequency())
+ try:
+ self.apList[index]["Channel"] = frequencies.index(self.apList[index]["Frequency"] + 1)
+ except:
+ self.apList[index]["Channel"] = "Unknown"
+
+ self.apList[index]["Quality"] = "%s/%s" % \
+ ( ap.quality.quality, wirelessObj.getQualityMax().quality )
+ self.apList[index]["Signal Level"] = "%s/%s" % \
+ ( ap.quality.getSignallevel(), "100" )
+ self.apList[index]["Noise Level"] = "%s/%s" % \
+ ( ap.quality.getNoiselevel(), "100" )
# get encryption key on/off
- key_status = "Unknown"
- if (ap.encode.flags & pythonwifi.flags.IW_ENCODE_DISABLED):
- key_status = "off"
- elif (ap.encode.flags & pythonwifi.flags.IW_ENCODE_NOKEY):
- if (ap.encode.length <= 0):
- key_status = "on"
- self.apList[index]["Encryption key"] = key_status
- self.apList[index]["BitRate"] = wirelessObj._formatBitrate(ap.rate[-1][-1])
- index += 1
+ key_status = "Unknown"
+ if (ap.encode.flags & pythonwifi.flags.IW_ENCODE_DISABLED):
+ key_status = "off"
+ elif (ap.encode.flags & pythonwifi.flags.IW_ENCODE_NOKEY):
+ if (ap.encode.length <= 0):
+ key_status = "on"
+ self.apList[index]["Encryption key"] = key_status
+ self.apList[index]["BitRate"] = wirelessObj._formatBitrate(ap.rate[-1][-1])
+ index += 1
# print self.apList
# print self.setApList
self.displayApInfo()
+ if len(self.apList) == 0:
+ self.emptyListMsgTimer.start(100,True)
def displayApInfo(self):
if len(self.apList) >0:
self["menulist"].setList(self.setApList)
- index = self["menulist"].getCurrent()[1]
- for key in ["Address", "ESSID", "Protocol", "Frequency", "Encryption key", "BitRate"]:
- if self.apList[index].has_key(key):
- self[key].setText((key+": "+self.apList[index][key]))
- else:
- self[key].setText((key+": None"))
- else:
- self.session.open(MessageBox, _("No AP detected."), type = MessageBox.TYPE_INFO, timeout = 10)
+ if self["menulist"].getCurrent() is not None:
+ index = self["menulist"].getCurrent()[1]
+ for key in ["Address", "ESSID", "Protocol", "Frequency", "Encryption key", "BitRate"]:
+ if self.apList[index].has_key(key) and self.apList[index][key] is not None:
+ self[key].setText((key+": "+self.apList[index][key]))
+ else:
+ self[key].setText((key+": None"))
+
+ def emptyListMsg(self):
+ self.session.open(MessageBox, _("No AP detected."), type = MessageBox.TYPE_INFO, timeout = 10)
+ self["Address"].setText(_("No AP detected."))
+ self["ESSID"].setText(_(""))
def restartScanAP(self):
self.getAplistTimer.start(100,True)
+ def __onClose(self):
+ if self.oldInterfaceState is False:
+ iNetwork.setAdapterAttribute(self.iface, "up", False)
+ iNetwork.deactivateInterface(self.iface)
+
class NetworkAdapterTest(Screen):
def __init__(self, session,iface):
Screen.__init__(self, session)