def _change_uid_gid(uid, gid=None):
 if (not (os.geteuid() == 0)):
  return
 os.setgid(gid)
 os.setuid(uid)

def _change_uid_gid ( uid , gid = None ) : if ( not ( os . geteuid ( ) == 0 ) ) : return os . setgid ( gid ) os . setuid ( uid )
try to change uid and gid to the provided values .