Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @classmethod
- def GetCachePath(cls):
- with cls.cachepath_lock:
- if not hasattr(cls, 'cachepath'):
- print("===================")
- print([cls.git_exe, 'config'] + cls._GIT_CONFIG_LOCATION + ['cache.cachepath'])
- print("===================")
- try:
- cachepath = subprocess.check_output(
- [cls.git_exe, 'config'] +
- cls._GIT_CONFIG_LOCATION +
- ['cache.cachepath']).strip()
- print("=====================")
- print(cachepath)
- print("=====================")
- except subprocess.CalledProcessError:
- cachepath = os.environ.get('GIT_CACHE_PATH', cls.UNSET_CACHEPATH)
- setattr(cls, 'cachepath', cachepath)
- ret = getattr(cls, 'cachepath')
- if ret is cls.UNSET_CACHEPATH:
- raise RuntimeError('No cache.cachepath git configuration or '
- '$GIT_CACHE_PATH is set.')
- return ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement