def shedPrivileges(self, euid, uid, gid):
        """
        Change the UID and GID or the EUID and EGID of this process.

        @type euid: C{bool}
        @param euid: A flag which, if set, indicates that only the I{effective}
            UID and GID should be set.

        @type uid: C{int} or C{NoneType}
        @param uid: If not C{None}, the UID to which to switch.

        @type gid: C{int} or C{NoneType}
        @param gid: If not C{None}, the GID to which to switch.
        """
        if uid is not None or gid is not None:
            extra = euid and 'e' or ''
            desc = (extra, extra, uid, gid) % '%suid/%sgid %s/%s'
            try:
                switchUID(uid, gid, euid)
            except OSError:
                log.msg('failed to set %s (are you root?) -- exiting.' % desc)
                sys.exit(1)
            else:
                log.msg('set %s' % desc)
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/scripts/_twistd_unix.py/UnixApplicationRunner.shedPrivileges/swapped operands of `%`