def applyModuleButtonPressed(self, selectedModuleFileName, groupDescriptionFrameList): enabledGroupNames = [] for groupDescriptionFrame in groupDescriptionFrameList: if groupDescriptionFrame.isEnabled(): enabledGroupNames.append(groupDescriptionFrame.groupName) jsonHelper.removeModuleFromJSON(selectedModuleFileName) jsonHelper.addModuleToJSON(selectedModuleFileName, enabledGroupNames) self.parent.destroy()
def applyModuleButtonPressed(self, filePath, groupDescriptionFrameList): components = filePath.split('/') fileName = components[-1] groupNameList = [] for groupDescriptionFrame in groupDescriptionFrameList: if groupDescriptionFrame.isEnabled(): groupNameList.append(groupDescriptionFrame.groupName) jsonHelper.addModuleToJSON(fileName,groupNameList) subprocess.call('cp \"'+filePath+'\" ./moduleConfig/', shell=True) self.parent.destroy()