def drop_privileged(self):
        if (self.params['uid'] == 'default' and
                self.params['gid'] == 'default'):
            return
        lg.debug("Plugin %s: dropping privileges to %s/%s"
                 % (self.name, self.params['uid'], self.params['gid']))
        try:
            os.setegid(self.params['gid'])
            os.seteuid(self.params['uid'])
        except __HOLE__ as e:
            lg.error("Plugin %s: config parameters uid/gid have to be "
                     "integers: %s" % (self.name, e))
            raise
        except OSError as e:
            lg.error("Plugin %s: can't switch effective UID/GID to %s/%s: %s"
                     % (self.name, self.params['uid'], self.params['gid'], e))
            raise
dataset/ETHPy150Open gooddata/smoker/smoker/server/plugins/__init__.py/PluginWorker.drop_privileged