Bug 692795

Summary: [abrt] qpid-qmf-devel-0.8-6.fc15: schema.py:1734:genV2ClassDefines:UnboundLocalError: local variable 'stat' referenced before assignment
Product: [Fedora] Fedora Reporter: Radek Novacek <rnovacek>
Component: qpid-cppAssignee: Nuno Santos <nsantos>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: andrew, aortega, nsantos, ovasik
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:1b26bb37
Fixed In Version: qpid-qmf-devel-0.10-2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-07 20:21:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 704353    
Attachments:
Description Flags
File: backtrace
none
Patch that fixes the issue none

Description Radek Novacek 2011-04-01 08:16:23 UTC
abrt version: 1.1.17
architecture: x86_64
component: qpid-cpp
executable: /usr/bin/qmf-gen
kernel: 2.6.38-1.fc15.x86_64
package: qpid-qmf-devel-0.8-6.fc15
reason: schema.py:1734:genV2ClassDefines:UnboundLocalError: local variable 'stat' referenced before assignment
release: Fedora release 15 (Lovelock)
time: 1301645656
uid: 500

backtrace
-----
schema.py:1734:genV2ClassDefines:UnboundLocalError: local variable 'stat' referenced before assignment

Traceback (most recent call last):
  File "/usr/bin/qmf-gen", line 80, in <module>
    gen.makeV2PackageFile("V2Package.cpp", package, vars=vargs)
  File "/usr/lib/python2.7/site-packages/qmfgen/generate.py", line 467, in makeV2PackageFile
    stream = template.expand (schema)
  File "/usr/lib/python2.7/site-packages/qmfgen/generate.py", line 100, in expand
    self.expandLine (line, stream, object)
  File "/usr/lib/python2.7/site-packages/qmfgen/generate.py", line 88, in expandLine
    self.handler.substHandler (object, stream, tagObject, tagName)
  File "/usr/lib/python2.7/site-packages/qmfgen/generate.py", line 392, in substHandler
    eval (call)
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/qmfgen/schema.py", line 1734, in genV2ClassDefines
    if stat.unit:
UnboundLocalError: local variable 'stat' referenced before assignment

Local variables in innermost frame:
stream: <cStringIO.StringO object at 0x1b1e228>
typeName: 'qmf::SCHEMA_DATA_INT'
variables: {'genQmfV1': None, 'commentPrefix': '//', 'agentHeaderDir': 'agent'}
self: <qmfgen.schema.SchemaPackage instance at 0x1a9af38>
subType: None
arg: <qmfgen.schema.SchemaArg instance at 0x1b2b5f0>
_class: <qmfgen.schema.SchemaClass instance at 0x1b27710>
method: <qmfgen.schema.SchemaMethod instance at 0x1b2b560>

How to reproduce
-----
1. Run qmf-gen to some schema.xml without statistics

Comment 1 Radek Novacek 2011-04-01 08:16:25 UTC
Created attachment 489316 [details]
File: backtrace

Comment 2 Radek Novacek 2011-04-01 08:19:26 UTC
Created attachment 489317 [details]
Patch that fixes the issue

It seems like copy&paste error (checking for wrong variable). Attached patch fixes the generation.

Comment 3 Nuno Santos 2011-05-17 18:34:27 UTC
*** Bug 704227 has been marked as a duplicate of this bug. ***

Comment 4 Nuno Santos 2011-06-14 18:06:10 UTC
This has been fixed with the recent update to 0.10, qpid-qmf-devel-0.10-2

Comment 5 Fedora End Of Life 2012-08-07 20:21:37 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping