Bug 997400 - [ovirt-guest-agent] RHEL5 guest agent uses 'finally' which is not supported by python 2.4.x in preuninstall scriptlet
Summary: [ovirt-guest-agent] RHEL5 guest agent uses 'finally' which is not supported b...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-guest-agent
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 3.3.0
Assignee: Vinzenz Feenstra [evilissimo]
QA Contact: Jiri Belka
URL:
Whiteboard: virt
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-15 12:17 UTC by Jiri Belka
Modified: 2015-09-22 13:09 UTC (History)
6 users (show)

Fixed In Version: is11
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-21 22:14:03 UTC
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jiri Belka 2013-08-15 12:17:28 UTC
Description of problem:

[snip]
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  File "<stdin>", line 8
    finally:
          ^
SyntaxError: invalid syntax
Error in PREUN scriptlet in rpm package r

Removed:
  rhevm-guest-agent.noarch 0:1.0.7-9.el5ev                                                                                                                     

Complete!


# rpm --scripts -qp rhevm-guest-agent-1.0.7-9.el5ev.noarch.rpm | sed -n '/python/,/^EOF/p;'
        /usr/bin/python << EOF
import os
vp = None
try:
    vp = os.open('$VIRTIO', os.O_WRONLY|os.O_NONBLOCK)
    os.write(vp, '{"__name__": "uninstalled" }\n')
except OSError:
    pass
finally:
    if vp:
        os.close(vp)
EOF
[root@localhost ~]# cat /etc/redhat-release ; python -V                                                                                                        
Red Hat Enterprise Linux Server release 5.9 (Tikanga)
Python 2.4.3

...A more complicated example (having except and finally clauses in the same try statement works as of Python 2.5)...

Version-Release number of selected component (if applicable):
is10 - rhevm-guest-agent-1.0.7-9.el5ev

How reproducible:
100%

Steps to Reproduce:
1. install GA on RHEL5 from is10
2.
3.

Actual results:
bogus preuninstall scriptlet

Expected results:
replace finally...

Additional info:
http://docs.python.org/2/tutorial/errors.html

Comment 4 Jiri Belka 2013-09-11 10:52:12 UTC
ok, is13 - 1.0.8-3.el5ev.

Comment 5 Itamar Heim 2014-01-21 22:14:03 UTC
Closing - RHEV 3.3 Released

Comment 6 Itamar Heim 2014-01-21 22:21:53 UTC
Closing - RHEV 3.3 Released


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