def setservicefile(self, nodenum, type, filename, srcname, data):
        ''' Receive a File Message from the GUI and store the customized file
        in the service config. The filename must match one from the list of
        config files in the service.
        '''
        if len(type.split(':')) < 2:
            self.session.warn("Received file type did not contain service info.")
            return
        if srcname is not None:
            raise NotImplementedError
        (svcid, svcname) = type.split(':')[:2]
        svc = self.getservicebyname(svcname)
        svc = self.getcustomservice(nodenum, svc)
        if svc is None:
            self.session.warn("Received filename for unknown service '%s'" % \
                              svcname)
            return
        cfgfiles = svc._configs
        if filename not in cfgfiles:
            self.session.warn("Received unknown file '%s' for service '%s'" \
                             % (filename, svcname))
            return
        i = cfgfiles.index(filename)
        configtxtlist = list(svc._configtxt)
        numitems = len(configtxtlist)
        if numitems < i+1:
            # add empty elements to list to support index assignment
            for j in range(1, numitems - (i + 2)):
                configtxtlist += None,
        configtxtlist[i] = data
        svc._configtxt = configtxtlist
dataset/ETHPy150Open coreemu/core/daemon/core/service.py/CoreServices.setservicefile/swapped operands of `-`