Bug 997400 - [ovirt-guest-agent] RHEL5 guest agent uses 'finally' which is not supported by python 2.4.x in preuninstall scriptlet
[ovirt-guest-agent] RHEL5 guest agent uses 'finally' which is not supported b...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-guest-agent (Show other bugs)
3.3.0
Unspecified Unspecified
high Severity high
: ---
: 3.3.0
Assigned To: Vinzenz Feenstra [evilissimo]
Jiri Belka
virt
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-15 08:17 EDT by Jiri Belka
Modified: 2015-09-22 09 EDT (History)
6 users (show)

See Also:
Fixed In Version: is11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-21 17:14:03 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jiri Belka 2013-08-15 08:17:28 EDT
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 06:52:12 EDT
ok, is13 - 1.0.8-3.el5ev.
Comment 5 Itamar Heim 2014-01-21 17:14:03 EST
Closing - RHEV 3.3 Released
Comment 6 Itamar Heim 2014-01-21 17:21:53 EST
Closing - RHEV 3.3 Released

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