Bug 693655
Summary: | AttributeError: 'str' object has no attribute 'rpartition' | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Alexander Todorov <atodorov> | ||||||
Component: | anaconda | Assignee: | Will Woods <wwoods> | ||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Release Test Team <release-test-team-automation> | ||||||
Severity: | urgent | Docs Contact: | |||||||
Priority: | urgent | ||||||||
Version: | 5.7 | CC: | borgan, mgracik | ||||||
Target Milestone: | beta | Keywords: | TestBlocker | ||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | anaconda-11.1.2.230-1 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2011-04-12 07:48:30 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 693654 | ||||||||
Attachments: |
|
Description
Alexander Todorov
2011-04-05 08:35:02 UTC
Looks like python in rhel 5.7 is older than 2.5. str.rpartition() is available only in 2.5 and later. This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release. Created attachment 490012 [details]
updates-rhel5-693655.img
Aw jeez, I thought I checked on that. Proposed patch using rstrip (which was definitely around in python 2.4) instead:
diff --git a/flags.py b/flags.py
index a5d380a..41f4858 100644
--- a/flags.py
+++ b/flags.py
@@ -37,9 +37,10 @@ class Flags:
# if the BOOT_IMAGE contains a space, pxelinux will strip one of the
# quotes leaving one at the end that shlex doesn't know what to do
# with
- (left, middle, right) = cmdline.rpartition("BOOT_IMAGE=")
- if right.count('"') % 2:
- cmdline = left + middle + '"' + right
+ if "BOOT_IMAGE=" in cmdline:
+ (left, right) = cmdline.rsplit("BOOT_IMAGE=",1)
+ if right.count('"') % 2:
+ cmdline = left + 'BOOT_IMAGE="' + right
lst = shlex.split(cmdline)
Attached updates.img contains this code; could someone confirm that it actually works as expected?
Created attachment 490097 [details]
updates-rhel5-693655.img (fixed for RHEL5-style updates)
The updates.img works for me but then I hit bug #694440 |