Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:sschapiro:openstack:upstream
fence-agents
fence_apc_fails_for_some_port_numbers.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fence_apc_fails_for_some_port_numbers.patch of Package fence-agents
commit 1aa83158556acbd04e598f36ccac60a6bebf8ab7 Author: Marek 'marx' Grac <mgrac@redhat.com> Date: Wed Jun 23 18:29:02 2010 +0200 fence_apc: fence_apc fails for some port numbers Problem is that string we parse looks like: 'Press Enter to continue ...\r 23-bar1 ON' and we did not expect text message before our line. Resolves: #606297 diff --git a/fence/agents/apc/fence_apc.py b/fence/agents/apc/fence_apc.py index 12ddf2a..d10dd5f 100755 --- a/fence/agents/apc/fence_apc.py +++ b/fence/agents/apc/fence_apc.py @@ -70,11 +70,11 @@ def get_power_status(conn, options): while True: exp_result = conn.log_expect(options, [ options["-c"], "Press <ENTER>" ], int(options["-Y"])) lines = conn.before.split("\n"); - show_re = re.compile('^\s*(\d+)- (.*?)\s+(ON|OFF)\s*') + show_re = re.compile('(^|\x0D)\s*(\d+)- (.*?)\s+(ON|OFF)\s*') for x in lines: res = show_re.search(x) if (res != None): - outlets[res.group(1)] = (res.group(2), res.group(3)) + outlets[res.group(2)] = (res.group(3), res.group(4)) conn.send("\r\n") if exp_result == 0: break
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor