def getVersionString():
    """
    Function return string with version information.
    It is performed by use one of three procedures: git describe,
    file in .git dir and file __VERSION__.
    """
    version_string = None
    try:
        version_string = subprocess.check_output(['git', 'describe'])
    except:
        logger.warning('Command "git describe" is not working')

    if version_string == None:  # noqa
        try:
            path_to_version = os.path.join(path_to_script,
                                           '../.git/refs/heads/master')
            with file(path_to_version) as f:
                version_string = f.read()
        except:
            logger.warning('Problem with reading file ".git/refs/heads/master"')

    if version_string == None:  # noqa
        try:
            path_to_version = os.path.join(path_to_script, '../__VERSION__')
            with file(path_to_version) as f:
                version_string = f.read()
            path_to_version = path_to_version + \
                              '  version number is created manually'

        except:
            logger.warning('Problem with reading file "__VERSION__"')

    return version_string
Function return string with version information.
    It is performed by use one of three procedures: git describe,
    file in .git dir and file __VERSION__.