remove unneeded return values from managers
This commit is contained in:
parent
87a2b5bfc1
commit
2a9e8c4017
@ -45,7 +45,6 @@ class inputManager():
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
environment['runtime']['debug'].writeDebugOut(environment,"Error while writeUInput",debug.debugLevel.ERROR)
|
environment['runtime']['debug'].writeDebugOut(environment,"Error while writeUInput",debug.debugLevel.ERROR)
|
||||||
environment['runtime']['debug'].writeDebugOut(environment, str(e),debug.debugLevel.ERROR)
|
environment['runtime']['debug'].writeDebugOut(environment, str(e),debug.debugLevel.ERROR)
|
||||||
return environment
|
|
||||||
|
|
||||||
def getPrevDeepestInput(self, environment):
|
def getPrevDeepestInput(self, environment):
|
||||||
shortcut = []
|
shortcut = []
|
||||||
|
@ -11,22 +11,18 @@ class screenManager():
|
|||||||
environment['runtime']['settingsManager'].getSetting(environment,'screen', 'driver'), 'screenDriver')
|
environment['runtime']['settingsManager'].getSetting(environment,'screen', 'driver'), 'screenDriver')
|
||||||
if environment['runtime']['settingsManager'].getSettingAsBool(environment,'screen', 'autodetectSuspendingScreen'):
|
if environment['runtime']['settingsManager'].getSettingAsBool(environment,'screen', 'autodetectSuspendingScreen'):
|
||||||
self.autoIgnoreScreens = environment['runtime']['screenDriver'].getIgnoreScreens()
|
self.autoIgnoreScreens = environment['runtime']['screenDriver'].getIgnoreScreens()
|
||||||
return environment
|
|
||||||
|
|
||||||
def shutdown(self, environment):
|
def shutdown(self, environment):
|
||||||
if environment['runtime']['screenDriver']:
|
if environment['runtime']['screenDriver']:
|
||||||
environment['runtime']['screenDriver'].shutdown(environment)
|
environment['runtime']['screenDriver'].shutdown(environment)
|
||||||
return environment
|
|
||||||
|
|
||||||
def update(self, environment):
|
def update(self, environment):
|
||||||
if not self.isSuspendingScreen(environment):
|
if not self.isSuspendingScreen(environment):
|
||||||
environment = environment['runtime']['screenDriver'].update(environment)
|
environment = environment['runtime']['screenDriver'].update(environment)
|
||||||
environment['screenData']['lastScreenUpdate'] = time.time()
|
environment['screenData']['lastScreenUpdate'] = time.time()
|
||||||
return environment
|
|
||||||
|
|
||||||
def isSuspendingScreen(self, environment):
|
def isSuspendingScreen(self, environment):
|
||||||
currScreen = environment['runtime']['screenDriver'].getCurrScreen()
|
currScreen = environment['runtime']['screenDriver'].getCurrScreen()
|
||||||
return ((currScreen in \
|
return ((currScreen in \
|
||||||
environment['runtime']['settingsManager'].getSetting(environment,'screen', 'suspendingScreen').split(',')) or
|
environment['runtime']['settingsManager'].getSetting(environment,'screen', 'suspendingScreen').split(',')) or
|
||||||
(currScreen in self.autoIgnoreScreens))
|
(currScreen in self.autoIgnoreScreens))
|
||||||
|
|
||||||
|
@ -15,9 +15,9 @@ class settingsManager():
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.settings = settings
|
self.settings = settings
|
||||||
def initialize(self, environment):
|
def initialize(self, environment):
|
||||||
return environment
|
pass
|
||||||
def shutdown(self, environment):
|
def shutdown(self, environment):
|
||||||
return environment
|
pass
|
||||||
def loadShortcuts(self, environment, kbConfigPath='../../config/keyboard/desktop.conf'):
|
def loadShortcuts(self, environment, kbConfigPath='../../config/keyboard/desktop.conf'):
|
||||||
kbConfig = open(kbConfigPath,"r")
|
kbConfig = open(kbConfigPath,"r")
|
||||||
while(True):
|
while(True):
|
||||||
@ -74,7 +74,6 @@ class settingsManager():
|
|||||||
soundIconFile = soundIconPath + Values[1]
|
soundIconFile = soundIconPath + Values[1]
|
||||||
environment['soundIcons'][soundIcon] = soundIconFile
|
environment['soundIcons'][soundIcon] = soundIconFile
|
||||||
siConfig.close()
|
siConfig.close()
|
||||||
return environment
|
|
||||||
|
|
||||||
def loadSettings(self, environment, settingConfigPath):
|
def loadSettings(self, environment, settingConfigPath):
|
||||||
if not os.path.exists(settingConfigPath):
|
if not os.path.exists(settingConfigPath):
|
||||||
@ -85,7 +84,6 @@ class settingsManager():
|
|||||||
|
|
||||||
def setSetting(self, environment, section, setting, value):
|
def setSetting(self, environment, section, setting, value):
|
||||||
environment['settings'].set(section, setting, value)
|
environment['settings'].set(section, setting, value)
|
||||||
return environment
|
|
||||||
|
|
||||||
def getSetting(self, environment, section, setting):
|
def getSetting(self, environment, section, setting):
|
||||||
value = ''
|
value = ''
|
||||||
|
@ -12,9 +12,9 @@ class driver():
|
|||||||
self.uDevices = {}
|
self.uDevices = {}
|
||||||
self.getInputDevices()
|
self.getInputDevices()
|
||||||
def initialize(self, environment):
|
def initialize(self, environment):
|
||||||
return environment
|
pass
|
||||||
def shutdown(self, environment):
|
def shutdown(self, environment):
|
||||||
return environment
|
pass
|
||||||
def getInput(self, environment):
|
def getInput(self, environment):
|
||||||
event = None
|
event = None
|
||||||
r, w, x = select(self.iDevices, [], [], environment['runtime']['settingsManager'].getSettingAsFloat(environment, 'screen', 'screenUpdateDelay'))
|
r, w, x = select(self.iDevices, [], [], environment['runtime']['settingsManager'].getSettingAsFloat(environment, 'screen', 'screenUpdateDelay'))
|
||||||
|
Loading…
Reference in New Issue
Block a user