Exemplo n.º 1
0
    def applyMachineButtonPressed(self, selectedMachineFileName, groupDescriptionFrameList):

        enabledGroupNames = []

        for groupDescriptionFrame in groupDescriptionFrameList:
            if groupDescriptionFrame.isEnabled():
                enabledGroupNames.append(groupDescriptionFrame.groupName)

        jsonHelper.removeMachineFromJSONForMachine(selectedMachineFileName)
        jsonHelper.addMachineToJSON(selectedMachineFileName, enabledGroupNames)

        self.parent.destroy()
Exemplo n.º 2
0
    def applyMachineButtonPressed(self, filePath, groupDescriptionFrameList):
        
        components = filePath.split('/')
        fileName = components[-1]

        groupNameList = []

        for groupDescriptionFrame in groupDescriptionFrameList:
            if groupDescriptionFrame.isEnabled():
                groupNameList.append(groupDescriptionFrame.groupName)

        jsonHelper.addMachineToJSON(fileName,groupNameList)

        subprocess.call('cp \"'+filePath+'\" ./machineConfig/', shell=True)
        self.parent.destroy()