Ejemplo n.º 1
0
    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()
Ejemplo n.º 2
0
    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()