You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
git.cmd.Git.version_info gets ValueError when it's running with git RC release.
I think it may be OK to just skip non-integer values of version.
sugi@tempest:~% git --version
git version 1.8.4.rc3
sugi@tempest:~% python
Python 2.7.3 (default, Jan 2 2013, 13:56:14)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import git
>>> g = git.Git()
>>> g.version()
'git version 1.8.4.rc3'
>>> g.version_info
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "git/cmd.py", line 261, in version_info
return self._version_info
File "git/cmd.py", line 237, in __getattr__
return LazyMixin.__getattr__(self, name)
File "git/util.py", line 357, in __getattr__
self._set_cache_(attr)
File "git/cmd.py", line 244, in _set_cache_
self._version_info = tuple(int(n) for n in version_numbers.split('.')[:4])
File "git/cmd.py", line 244, in <genexpr>
self._version_info = tuple(int(n) for n in version_numbers.split('.')[:4])
ValueError: invalid literal for int() with base 10: 'rc3'
The text was updated successfully, but these errors were encountered:
It looks like cmd.py expects a 4-tuple of integers. I also believe that git version 1.8.4 has been released, so upgrading git would also solve this issue. Other than that it looks like some sort of logic for dealing with release candidates would have to be added.
git.cmd.Git.version_info gets ValueError when it's running with git RC release.
I think it may be OK to just skip non-integer values of version.
The text was updated successfully, but these errors were encountered: