From: Chang.H.S Date: Tue, 18 Dec 2012 01:29:22 +0000 (+0900) Subject: Merge branch 'vuplus_experimental' of code.vuplus.com:/opt/repository/dvbapp into... X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=commitdiff_plain;h=39138d288a2572f954d89a00383e763abb71cef4;hp=9d9d69d8242d27915c95cb794bd4e7a93759b6db Merge branch 'vuplus_experimental' of code.vuplus.com:/opt/repository/dvbapp into vuplus_experimental --- diff --git a/lib/python/Plugins/SystemPlugins/DeviceManager/plugin.py b/lib/python/Plugins/SystemPlugins/DeviceManager/plugin.py index ec12258..ec85d0f 100755 --- a/lib/python/Plugins/SystemPlugins/DeviceManager/plugin.py +++ b/lib/python/Plugins/SystemPlugins/DeviceManager/plugin.py @@ -879,11 +879,14 @@ class DeviceFormat(Screen): self.onLayoutFinish.append(self.timerStart) self.formatStartTimer = eTimer() self.formatStartTimer.callback.append(self.DeviceFormatStart) + self.setHotplugDisabled = False def timerStart(self): self.formatStartTimer.start(100,True) def DeviceFormatStart(self): + devicemanagerhotplug.setHotplugActive(False) + self.setHotplugDisabled = True print "DeviceFormatStart : ", self.partition, print "Filesystem : ",self.newfstype device = self.partition["partition"] @@ -1010,6 +1013,9 @@ class DeviceFormat(Screen): self.session.openWithCallback(self.exit, MessageBox, msg, MessageBox.TYPE_ERROR, timeout = 10) def exit(self, ret): + if self.setHotplugDisabled == True: + devicemanagerhotplug.setHotplugActive(True) + self.setHotplugDisabled = False self.close() #device format end @@ -1414,6 +1420,12 @@ class deviceManagerHotplug: def __init__(self): self.hotplugActive = True + def setHotplugActive(self,value=True): + if value: + self.hotplugActive = True + else: + self.hotplugActive = False + def printDebug(self): for p in harddiskmanager.partitions: print " # partition : %s %s %s %s %s(mp, des, f_mounted, is_hot, dev)"%(p.mountpoint, p.description, p.force_mounted, p.is_hotplug,p.device) @@ -1455,11 +1467,13 @@ class deviceManagerHotplug: def doUmount(self, device, mountpoint): devpath = "/dev/"+device - if len(deviceinfo.checkMountDev(devpath)) == 0: + mountpoints = deviceinfo.checkMountDev(devpath) + if len(mountpoints) == 0: return - cmd = "umount %s"%devpath - print "[DeviceManager] cmd : %s"%cmd - os.system(cmd) + for mp in mountpoints: + cmd = "umount %s"%devpath + print "[DeviceManager] cmd : %s"%cmd + os.system(cmd) def addHotPlugDevice(self, partition): device = partition.device diff --git a/lib/python/Plugins/SystemPlugins/WirelessAccessPoint/plugin.py b/lib/python/Plugins/SystemPlugins/WirelessAccessPoint/plugin.py index ff6849d..1416e31 100755 --- a/lib/python/Plugins/SystemPlugins/WirelessAccessPoint/plugin.py +++ b/lib/python/Plugins/SystemPlugins/WirelessAccessPoint/plugin.py @@ -523,9 +523,12 @@ class WirelessAccessPoint(Screen,ConfigListScreen): sysctlList = {} for line in sysctlLines: line = line.strip() - (key,value) = line.split("=") - key=key.strip() - value=value.strip() + try: + (key,value) = line.split("=") + key=key.strip() + value=value.strip() + except: + continue sysctlList[key] = value sysctlList["net.ipv4.ip_forward"] = str(setValue) fp = file(sysctlPath, "w") diff --git a/lib/python/Plugins/SystemPlugins/WirelessLanSetup/plugin.py b/lib/python/Plugins/SystemPlugins/WirelessLanSetup/plugin.py index 671cac9..e31075f 100755 --- a/lib/python/Plugins/SystemPlugins/WirelessLanSetup/plugin.py +++ b/lib/python/Plugins/SystemPlugins/WirelessLanSetup/plugin.py @@ -577,7 +577,7 @@ class WlanConfig(Screen, ConfigListScreen, HelpableScreen): self.emptyListMsgTimer.start(100,True) else: for ap in Iwscanresult: - if ap.essid not in self.apList and len(ap.essid) > 0: + 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: