<commit_before># -*- coding: utf-8 -*-
#Copyright (C) 2009-2010 :
#    <NAME>, <EMAIL>
#    <NAME>, <EMAIL>
#    <NAME>, <EMAIL>
#    <NAME>, <EMAIL>
#
#This file is part of Shinken.
#
#Shinken is free software: you can redistribute it and/or modify
#it under the terms of the GNU Affero General Public License as published by
#the Free Software Foundation, either version 3 of the License, or
#(at your option) any later version.
#
#Shinken is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#GNU Affero General Public License for more details.
#
#You should have received a copy of the GNU Affero General Public License
#along with Shinken.  If not, see <http://www.gnu.org/licenses/>.

import os
import errno
import sys
import time
import signal
import select
import random 
import ConfigParser

from multiprocessing import active_children

import shinken.pyro_wrapper as pyro
from shinken.pyro_wrapper import InvalidWorkDir, Pyro

from shinken.log import logger
from shinken.modulesmanager import ModulesManager
from shinken.property import StringProp, BoolProp, PathProp, ConfigPathProp


if os.name != 'nt':
    import pwd, grp
    from pwd import getpwnam
    from grp import getgrnam
    def get_cur_user():
        return pwd.getpwuid( os.getuid() ).pw_name

    def get_cur_group():
        return grp.getgrgid( os.getgid() ).gr_name
else:
    # temporary workarround :
    def get_cur_user():
        return "shinken"
    def get_cur_group():
        return "shinken"

##########################   DAEMON PART    ###############################
# The standard I/O file descriptors are redirected to /dev/null by default.
REDIRECT_TO = getattr(os, "devnull", "/dev/null")

UMASK = 0
from shinken.bin import VERSION


class InvalidPidFile(Exception): pass



class Interface(Pyro.core.ObjBase, object):
    """ Interface for pyro communications """
    
    def __init__(self, app):
        """ 'app´ is to be set to the owner of this interface. """
<commit_msg>Fix wrong umask value 027<commit_after># -*- coding: utf-8 -*-
#Copyright (C) 2009-2010 :
#    <NAME>, <EMAIL>
#    <NAME>, <EMAIL>
#    <NAME>, <EMAIL>
#    <NAME>, <EMAIL>
#
#This file is part of Shinken.
#
#Shinken is free software: you can redistribute it and/or modify
#it under the terms of the GNU Affero General Public License as published by
#the Free Software Foundation, either version 3 of the License, or
#(at your option) any later version.
#
#Shinken is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#GNU Affero General Public License for more details.
#
#You should have received a copy of the GNU Affero General Public License
#along with Shinken.  If not, see <http://www.gnu.org/licenses/>.

import os
import errno
import sys
import time
import signal
import select
import random 
import ConfigParser

from multiprocessing import active_children

import shinken.pyro_wrapper as pyro
from shinken.pyro_wrapper import InvalidWorkDir, Pyro

from shinken.log import logger
from shinken.modulesmanager import ModulesManager
from shinken.property import StringProp, BoolProp, PathProp, ConfigPathProp


if os.name != 'nt':
    import pwd, grp
    from pwd import getpwnam
    from grp import getgrnam
    def get_cur_user():
        return pwd.getpwuid( os.getuid() ).pw_name

    def get_cur_group():
        return grp.getgrgid( os.getgid() ).gr_name
else:
    # temporary workarround :
    def get_cur_user():
        return "shinken"
    def get_cur_group():
        return "shinken"

##########################   DAEMON PART    ###############################
# The standard I/O file descriptors are redirected to /dev/null by default.
REDIRECT_TO = getattr(os, "devnull", "/dev/null")

UMASK = 027
from shinken.bin import VERSION


class InvalidPidFile(Exception): pass



class Interface(Pyro.core.ObjBase, object):
    """ Interface for pyro communications """
    
    def __init__(self, app):
        """ 'app´ is to be set to the owner of this interface. """

{'fraction_non_alphanumeric': 0.11021377672209026, 'fraction_numerical': 0.006413301662707839, 'mean_word_length': 3.868208092485549, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4505263', 'n_tokens_mistral': 1311, 'n_tokens_neox': 1259, 'n_words': 498}