PBR

Comment 2 for bug 1467440

Revision history for this message
Florian Wilhelm (florian-wilhelm-gmail) wrote :

It's actually quite obvious. In packaging._get_revno_and_last_tag we have following code:

changelog = git._iter_log_oneline(git_dir=git_dir)
row_count = 0
for row_count, (ignored, tag_set, ignored) in enumerate(changelog):

If git._iter_log_online returns None what it sometimes does, we get "TypeError: 'NoneType' object is not iterable".
You can also achieve this by setting os.environ['SKIP_WRITE_GIT_CHANGELOG'] = '1' in your setup.py.
I'll attach a small sample project that does exactly this.
The fix is just to add the line changelog = changelog if changelog else [] after changelog = git._iter_log_oneline(git_dir=git_dir). I have a PR ready. Just let me know.