[Debian-ha-svn-commits] [SCM] cluster suite Debian packaging branch, experimental, updated. debian/3.0.12-1-5-g4c63a81

Guido Günther agx at sigxcpu.org
Fri Jul 2 12:08:39 UTC 2010


The following commit has been merged in the experimental branch:
commit 743916eccd6eef5c85e086d03b05cafb76e2b3ca
Author: Guido Günther <agx at sigxcpu.org>
Date:   Fri Jul 2 13:54:36 2010 +0200

    New patch 0006-Raise-exceptions-not-strings.patch
    
    Raise exceptions not strings
    
    Closes: #585211

diff --git a/debian/patches/0006-Raise-exceptions-not-strings.patch b/debian/patches/0006-Raise-exceptions-not-strings.patch
new file mode 100644
index 0000000..cb37c14
--- /dev/null
+++ b/debian/patches/0006-Raise-exceptions-not-strings.patch
@@ -0,0 +1,43 @@
+From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx at sigxcpu.org>
+Date: Fri, 2 Jul 2010 13:42:57 +0200
+Subject: [PATCH] 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
+
+Closes: #585211
+---
+ fence/agents/rsb/fence_rsb.py |    6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+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 = ''
+-- 
diff --git a/debian/patches/series b/debian/patches/series
index a835b38..df51c09 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
 0003-Don-t-rely-on-chkconfig-and-check-for-network-manage.patch
 0004-Depend-on-remote_fs.patch
 0005-Remove-bashisms-from-resource-scripts.patch
+0006-Raise-exceptions-not-strings.patch

-- 
cluster suite Debian packaging



More information about the Debian-ha-svn-commits mailing list