Bug 681904 - qpid-tools' qpid-printevents crashes on 'finally' (RHEL4/5)
Summary: qpid-tools' qpid-printevents crashes on 'finally' (RHEL4/5)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-qmf
Version: Development
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: 2.0
: ---
Assignee: messaging-bugs
QA Contact: Frantisek Reznicek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-03 14:53 UTC by Frantisek Reznicek
Modified: 2015-11-16 01:13 UTC (History)
3 users (show)

Fixed In Version: qpid-tools-0.9.1078967-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-07 17:41:08 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Frantisek Reznicek 2011-03-03 14:53:28 UTC
Description of problem:

qpid-printevents is not usable on RHEL4/5

[root@mrg-qe-07 c++]# qpid-printevents
  File "/usr/bin/qpid-printevents", line 108
    finally:
          ^
SyntaxError: invalid syntax

Python supports 'finally:' keyword since version 2.5+. RHEL4/5 ships with 2.3.4 resp. 2.4.3.


Version-Release number of selected component (if applicable):
[root@mrg-qe-07 c++]# rpm -qf `which qpid-printevents`
qpid-tools-0.9.1073306-1.el4.noarch


How reproducible:
100%

Steps to Reproduce:
1. qpid-printevents
2. echo $?
  
Actual results:
Tool not usable.

Expected results:
Tool should be usable or should go away.

Additional info:

Comment 1 Justin Ross 2011-03-03 14:59:54 UTC
I think it's rather that those earlier versions of python don't support:

try:
    pass
except:
    pass
finally:
    pass

They do, however, support:

try:
    try:
        pass
    except:
        pass
finally:
    pass

Comment 2 Frantisek Reznicek 2011-03-03 15:05:19 UTC
(In reply to comment #1)
> I think it's rather that those earlier versions of python don't support:
> 
> try:
>     pass
> except:
>     pass
> finally:
>     pass
> 
> They do, however, support:
> 
> try:
>     try:
>         pass
>     except:
>         pass
> finally:
>     pass

Yes, that matches with:
http://docs.python.org/reference/compound_stmts.html
(s/Changed in version 2.5)

Comment 3 Gordon Sim 2011-03-03 16:41:49 UTC
Fixed upstream: http://svn.apache.org/viewvc/qpid/trunk/qpid/tools/src/py/qpid-printevents?r1=1075862&r2=1075861&pathrev=1075862, this was not broken in 1.3 so marking version as development.

Comment 4 Frantisek Reznicek 2011-04-04 09:24:17 UTC
The issue has been fixed, tested on RHEL4.9 / 5.6 / 6.1 i386 / x86_64 on packages:
# rpm -qa | grep -E '(qpid|sesame)' | sort
python-qpid-0.10-1.el5.noarch
python-qpid-qmf-0.10-2.el5.x86_64
qpid-cpp-client-0.10-1.el5.x86_64
qpid-cpp-client-devel-0.10-1.el5.x86_64
qpid-cpp-client-devel-docs-0.10-1.el5.x86_64
qpid-cpp-client-rdma-0.10-1.el5.x86_64
qpid-cpp-client-ssl-0.10-1.el5.x86_64
qpid-cpp-mrg-debuginfo-0.10-1.el5.x86_64
qpid-cpp-server-0.10-1.el5.x86_64
qpid-cpp-server-cluster-0.10-1.el5.x86_64
qpid-cpp-server-devel-0.10-1.el5.x86_64
qpid-cpp-server-rdma-0.10-1.el5.x86_64
qpid-cpp-server-ssl-0.10-1.el5.x86_64
qpid-cpp-server-store-0.10-1.el5.x86_64
qpid-cpp-server-xml-0.10-1.el5.x86_64
qpid-dotnet-0.4.738274-2.el5.x86_64
qpid-java-client-0.10-1.el5.noarch
qpid-java-common-0.10-1.el5.noarch
qpid-java-example-0.10-1.el5.noarch
qpid-qmf-0.10-2.el5.x86_64
qpid-qmf-debuginfo-0.10-2.el5.x86_64
qpid-qmf-devel-0.10-2.el5.x86_64
qpid-tests-0.9.1073306-1.el5.noarch
qpid-tools-0.10-1.el5.noarch
rh-qpid-cpp-tests-0.10-1.el5.x86_64
ruby-qpid-qmf-0.10-2.el5.x86_64
sesame-0.10-1.el5.x86_64
sesame-debuginfo-0.10-1.el5.x86_64

-> VERIFIED


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