def getservicefile(self, services, node, filename):
        ''' Send a File Message when the GUI has requested a service file.
        The file data is either auto-generated or comes from an existing config.
        '''
        svc = services[0]
        # get the filename and determine the config file index
        if svc._custom:
            cfgfiles = svc._configs
        else:
            cfgfiles = svc.getconfigfilenames(node.objid,  services)
        if filename not in cfgfiles:
            self.session.warn("Request for unknown file '%s' for service '%s'" \
                             % (filename, services[0]))
            return None
            
        # get the file data
        data = self.getservicefiledata(svc, filename)
        if data is None:
            data = "%s" % (svc.generateconfig(node, filename, services))
        else:
            data = data % "%s"
        filetypestr = "service:%s" % svc._name
            
        # send a file message
        flags = coreapi.CORE_API_ADD_FLAG
        tlvdata = coreapi.CoreFileTlv.pack(coreapi.CORE_TLV_FILE_NODE, node.objid)
        tlvdata += coreapi.CoreFileTlv.pack(coreapi.CORE_TLV_FILE_NAME, filename)
        tlvdata += coreapi.CoreFileTlv.pack(coreapi.CORE_TLV_FILE_TYPE, filetypestr)
        tlvdata += coreapi.CoreFileTlv.pack(coreapi.CORE_TLV_FILE_DATA, data)
        reply = coreapi.CoreFileMessage.pack(flags, tlvdata)
        return reply
dataset/ETHPy150Open coreemu/core/daemon/core/service.py/CoreServices.getservicefile/swapped operands of `%`