fix coding style for vcs.py

This commit is contained in:
lilydjwg 2014-11-03 16:15:35 +08:00
parent 5457360858
commit 0863ff5adf
1 changed files with 5 additions and 5 deletions

View File

@ -8,22 +8,22 @@ import os.path as _path
logger = logging.getLogger(__name__)
_self_path = _path.dirname(_path.abspath(__file__))
_cmd_prefix=['/bin/bash', _path.join(_self_path, 'vcs.sh')]
_cmd_prefix = ['/bin/bash', _path.join(_self_path, 'vcs.sh')]
PROT_VER = 1
def _parse_oldver(oldver):
if oldver is None:
return (PROT_VER, 0, '')
return PROT_VER, 0, ''
try:
prot_ver, count, ver = oldver.split('.', maxsplit=2)
prot_ver = int(prot_ver)
count = int(count)
except:
return (PROT_VER, 0, '')
return PROT_VER, 0, ''
if prot_ver != PROT_VER:
return (PROT_VER, 0, ver)
return (PROT_VER, count, ver)
return PROT_VER, 0, ver
return PROT_VER, count, ver
def get_version(name, conf, callback):
vcs = conf['vcs']