def get_version(self):
        if self._incremented_version:
            return self._version
            
        if not self.has_version():
            return None
        
        path = self.get('global.cache_bust.versioning.filename', './version')
        
        if os.path.exists(path):
            version = open(path, 'r').read()
            try:
                version = int(version)
            except __HOLE__:
                version = 0
        else:
            version = 0
        
        version += 1
        open(path, 'w').write(str(version))
        self._version = version
        self._incremented_version = True
        
        return self._version
dataset/ETHPy150Open cooper-software/siteglass/siteglass/config.py/Config.get_version