#359 [PATCH] Fix UnboundLocalError in pungi.py
Opened by timothylee. Modified

I'm using the latest revisor (2.0.5.2-2.el5) that comes with CentOS 5 to build a custom installer CD, but have found that pungi.yi dies with an "UnboundLocalError" if one of the repos doesn't come with a comps.xml (eg: RPMforge). The error occurs because pungi.py is attempting to look inside an unassigned "category" variable, which is the case when comps.xml is not available for parsing.

I have attached a patch against the current trunk. The error is avoided by ensuring these kind of variables ("category" and "group") are checked only after they have been assigned a value. The behaviour of the code should be unmodified for cases when comps.xml do exist.


Metadata Update from @timothylee:
- Issue tagged with: comps.xml, pungi

Metadata