1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-18 08:54:15 +01:00

Merge branch 'parched/OP-1733_version-info.py_should_check_for_json_first' into next

This commit is contained in:
James Duley 2015-02-19 11:25:04 +13:00
commit db7d605ebc

View File

@ -113,15 +113,15 @@ class Repo:
"""Initialize object instance and read repo info""" """Initialize object instance and read repo info"""
self._path = path self._path = path
self._exec('rev-parse --verify HEAD') self._exec('rev-parse --verify HEAD')
if self._rc == 0: if self._load_json():
pass
elif self._rc == 0:
self._hash = self._out.strip(' \t\n\r') self._hash = self._out.strip(' \t\n\r')
self._get_origin() self._get_origin()
self._get_time() self._get_time()
self._get_tag() self._get_tag()
self._get_branch() self._get_branch()
self._get_dirty() self._get_dirty()
elif self._load_json():
pass
else: else:
self._hash = None self._hash = None
self._origin = None self._origin = None