Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:sschapiro:openstack:upstream
fence-agents
fence_rsb_raise_exceptions.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fence_rsb_raise_exceptions.patch of Package fence-agents
commit d2a6476f69fedd569b61e1a790cba3ce9ceb9f15 Author: Guido Günther <agx@sigxcpu.org> Date: Fri Jul 2 13:42:57 2010 +0200 fence_rsb: Raise exceptions not strings otherwise we'll see in python 2.6 Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: exceptions must be old-style classes or derived from BaseException, not str Signed-off-by: Marek 'marx' Grac <mgrac@redhat.com> Resolves: rhbz#612941 diff --git a/fence/agents/rsb/fence_rsb.py b/fence/agents/rsb/fence_rsb.py index 8397f36..759ae2d 100644 --- a/fence/agents/rsb/fence_rsb.py +++ b/fence/agents/rsb/fence_rsb.py @@ -167,7 +167,7 @@ def main(): if 'passwd_script' in params: passwd_script = params['passwd_script'] if passwd == "" and passwd_script == "": - raise "missing password" + raise Exception, "missing password" except KeyError, e: os.write(standard_err, "FENCE: Missing passwd param for fence_rsb...exiting") sys.exit(1) @@ -197,11 +197,11 @@ def main(): if len(passwd_script): try: if not os.access(passwd_script, os.X_OK): - raise 'script not executable' + raise Exception, 'script not executable' p = os.popen(passwd_script, 'r', 1024) passwd_scr = p.readline().strip() if p.close() != None: - raise 'script failed' + raise Exception, 'script failed' except: sys.stderr.write('password-script "%s" failed\n' % passwd_script) passwd_scr = ''
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