Bug 1046917 - [PATCH] generic_should: fix self.flags uninitialized
Summary: [PATCH] generic_should: fix self.flags uninitialized
Keywords:
Status: CLOSED DUPLICATE of bug 1044580
Alias: None
Product: Fedora
Classification: Fedora
Component: fedora-review
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Stanislav Ochotnicky
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-27 11:40 UTC by Igor Gnatenko
Modified: 2013-12-27 14:57 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-12-27 14:57:30 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
0001-generic_should-fix-self.flags-uninitialized.patch (2.50 KB, patch)
2013-12-27 11:42 UTC, Igor Gnatenko
no flags Details | Diff

Description Igor Gnatenko 2013-12-27 11:40:47 UTC
$ $ find -maxdepth 1 -type f
./se-sandbox-runner-1.3.5-1.fc20.src.rpm
./se-sandbox-runner.spec
$ fedora-review -n se-sandbox-runner
[snipped]
ERROR: Exception down the road...(logs in /home/brain/.cache/fedora-review.log)
$ cat /home/brain/.cache/fedora-review.log
[snipped]
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/FedoraReview/review_helper.py", line 232, in run
    self._do_run(outfile)
  File "/usr/lib/python2.7/site-packages/FedoraReview/review_helper.py", line 222, in _do_run
    self._do_report(outfile)
  File "/usr/lib/python2.7/site-packages/FedoraReview/review_helper.py", line 96, in _do_report
    self._run_checks(self.bug.spec_file, self.bug.srpm_file, outfile)
  File "/usr/lib/python2.7/site-packages/FedoraReview/review_helper.py", line 105, in _run_checks
    self.checks = Checks(spec, srpm)
  File "/usr/lib/python2.7/site-packages/FedoraReview/checks.py", line 268, in __init__
    _ChecksLoader.__init__(self)
  File "/usr/lib/python2.7/site-packages/FedoraReview/checks.py", line 166, in __init__
    self._load_checks()
  File "/usr/lib/python2.7/site-packages/FedoraReview/checks.py", line 204, in _load_checks
    tests = registry.register(plugin)
  File "/usr/lib/python2.7/site-packages/FedoraReview/registry.py", line 130, in register
    obj = (c[1])(self.checks)
  File "/usr/lib/python2.7/site-packages/FedoraReview/plugins/generic_should.py", line 80, in __init__
    if self.flags['EPEL5']:
KeyError: 'EPEL5'

Comment 1 Igor Gnatenko 2013-12-27 11:42:32 UTC
Created attachment 842288 [details]
0001-generic_should-fix-self.flags-uninitialized.patch

Patch for fix.

Comment 2 Zbigniew Jędrzejewski-Szmek 2013-12-27 14:28:12 UTC
Hm, I don't know the code at all, but overwriting self.flags, which was already initialized before, with a newly created object seems wrong.

Comment 3 Alec Leamas 2013-12-27 14:57:30 UTC
Thanks for patch! Will look into this over the weekend.

*** This bug has been marked as a duplicate of bug 1044580 ***


Note You need to log in before you can comment on or make changes to this bug.