#38 Do not work when %build is missing
Closed: Fixed Opened by misc.

A package without %build section stop fedora-review. Patch attached.

{{{
$ fedora-review -b 803082
Processing review bug : 803082
Getting .spec and .srpm Urls from bug report : 803082
Downloading .spec and .srpm files
Traceback (most recent call last):
File "/usr/bin/fedora-review", line 203, in
review.run()
File "/usr/bin/fedora-review", line 197, in run
self.do_report()
File "/usr/bin/fedora-review", line 111, in __do_report
self.__do_report_local(self.args.workdir)
File "/usr/bin/fedora-review", line 120, in __do_report_local
self.__run_checks(files_spec[0], files_srpm[0])
File "/usr/bin/fedora-review", line 154, in __run_checks
mock_config=self.args.mock_config)
File "/usr/lib/python2.7/site-packages/FedoraReview/misc.py", line 61, in __init

self.add_check_classes()
File "/usr/lib/python2.7/site-packages/FedoraReview/misc.py", line 74, in add_check_classes
self.add(obj)
File "/usr/lib/python2.7/site-packages/FedoraReview/misc.py", line 91, in add
cls = class_name(self)
File "/usr/lib/python2.7/site-packages/FedoraReview/checks/java.py", line 364, in init
self.build_sec = self.spec.get_section('%build')['%build']
KeyError: '%build'
}}}


Thanks for the patch. Committed. Just for future: Keep in mind that first line of the git commit message is a subject of an email so try to keep it short, then one empty line and then longer description if needed.

For the reference, it's commit 3f4214ad4cf64297e84da1e3d09a18094eace2cb

Metadata