nokia / git-changelog-generator

Git Changelog Generator
https://pypi.python.org/pypi/gcg
BSD 3-Clause "New" or "Revised" License
14 stars 5 forks source link

Using -t / --prefer-tags throws an error #41

Open felfert opened 5 years ago

felfert commented 5 years ago

Subject says it all. Tried older versions down to 1.5 as well: All throw the same (with different line number, of course). The one below is from gcg-0.2.0.dev269:

[felfert@fritz git-changelog-generator]$ gcg -O rpm -t
Traceback (most recent call last):
  File "/home/felfert/.local/bin/gcg", line 11, in <module>
    sys.exit(main())
  File "/home/felfert/.local/lib/python2.7/site-packages/gcg/entrypoint.py", line 324, in main
    headers = collate_entry_header_data(repo, entries, options)
  File "/home/felfert/.local/lib/python2.7/site-packages/gcg/entrypoint.py", line 198, in collate_entry_header_data
    hdr = log_entry_header_from_tag(repo.tags[version].tag)
  File "/home/felfert/.local/lib/python2.7/site-packages/gcg/entrypoint.py", line 234, in log_entry_header_from_tag
    authored_date = tag.tagged_date
AttributeError: 'NoneType' object has no attribute 'tagged_date'
felfert commented 5 years ago

Found it. Will create a PR with a fix and additional test cases.