def parseFields(self, serviceName, socketType, protocol, wait, user,
                    program, *programArgs):
        """
        Parse an inetd.conf file.

        Implemented from the description in the Debian inetd.conf man page.
        """
        # Extract user (and optional group)
        user, group = (user.split('.') + [None])[:2]

        # Find the port for a service
        port = self.knownServices.services.get((serviceName, protocol), None)
        if not port and not protocol.startswith('rpc/'):
            # FIXME: Should this be discarded/ignored, rather than throwing
            #        an exception?
            try:
                port = int(serviceName)
                serviceName = 'unknown'
            except:
                raise UnknownService("Unknown service: %s (%s)" % (
                    serviceName, protocol))

        self.services.append(InetdService(serviceName, port, socketType,
                                          protocol, wait, user, group, program,
                                          programArgs))

        Parse an inetd.conf file.

        Implemented from the description in the Debian inetd.conf man page.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/runner/inetdconf.py