Use the name as the fallback cache key for vcs packages

Fixes #88
This commit is contained in:
Chih-Hsuan Yen 2018-12-15 21:43:46 +08:00
parent 5848aa39d9
commit 0301155177
No known key found for this signature in database
GPG Key ID: 0453A6CA23C56315

View File

@ -7,12 +7,16 @@ import os.path as _path
from pkg_resources import parse_version
import structlog
from . import conf_cacheable_with_name
logger = structlog.get_logger(logger_name=__name__)
_self_path = _path.dirname(_path.abspath(__file__))
_cmd_prefix = ['/bin/bash', _path.join(_self_path, 'vcs.sh')]
PROT_VER = 1
get_cacheable_conf = conf_cacheable_with_name('vcs')
def _parse_oldver(oldver):
if oldver is None:
return PROT_VER, 0, ''