On Wed, 2009-12-02 at 14:33 +0100, Kamil Páral wrote:
I don't know if this patch is the best solution, I would have to
study the
code longer, but it certainly fixes the traceback:
Traceback (most recent call last):
File "/usr/bin/autoqa", line 166, in <module>
testlist = hook.process_testlist(opts, args, testlist)
File "/usr/share/autoqa/post-koji-build/hook.py", line 31, in
process_testlist
if 'x86_64' not in opts.arch and 'rpmlint' in testlist:
TypeError: argument of type 'NoneType' is not iterable
Ah - the problem here is that opts.arch is None instead of an empty list
if no --arch flags are passed. Fixed by making opts.arch default to []:
-parser.add_option('-a', '--arch', action='append',
+parser.add_option('-a', '--arch', action='append', default=[],
(that's commit ed12db2)
It might be a good idea to fix the option name so it's 'arches', to make
it clear that it's supposed to be a list, but the arg is --arch so the
default name was opts.arch. Oh well.
-w