This should fix the build failure in the daily build.
>From 5fad455ff41c7ab8acb8b41ea1c9c752830ce1ea Mon Sep 17 00:00:00 2001
From: Jason Gerard DeRose <jder...@redhat.com>
Date: Thu, 15 Oct 2009 15:00:57 -0600
Subject: [PATCH] Fixed try/except/finally for Python 2.4 compatability

---
 ipaserver/rpcserver.py |   39 ++++++++++++++++++++-------------------
 1 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/ipaserver/rpcserver.py b/ipaserver/rpcserver.py
index 06fb5ae..72f2219 100644
--- a/ipaserver/rpcserver.py
+++ b/ipaserver/rpcserver.py
@@ -103,25 +103,26 @@ class WSGIExecutioner(Executioner):
         error = None
         _id = None
         try:
-            self.create_context(ccache=environ.get('KRB5CCNAME'))
-            if (
-                environ.get('CONTENT_TYPE', '').startswith(self.content_type)
-                and environ['REQUEST_METHOD'] == 'POST'
-            ):
-                data = read_input(environ)
-                (name, args, options, _id) = self.unmarshal(data)
-            else:
-                (name, args, options, _id) = self.simple_unmarshal(environ)
-            if name not in self.Command:
-                raise CommandError(name=name)
-            result = self.Command[name](*args, **options)
-        except PublicError, e:
-            error = e
-        except StandardError, e:
-            self.exception(
-                'non-public: %s: %s', e.__class__.__name__, str(e)
-            )
-            error = InternalError()
+            try:
+                self.create_context(ccache=environ.get('KRB5CCNAME'))
+                if (
+                    environ.get('CONTENT_TYPE', '').startswith(self.content_type)
+                    and environ['REQUEST_METHOD'] == 'POST'
+                ):
+                    data = read_input(environ)
+                    (name, args, options, _id) = self.unmarshal(data)
+                else:
+                    (name, args, options, _id) = self.simple_unmarshal(environ)
+                if name not in self.Command:
+                    raise CommandError(name=name)
+                result = self.Command[name](*args, **options)
+            except PublicError, e:
+                error = e
+            except StandardError, e:
+                self.exception(
+                    'non-public: %s: %s', e.__class__.__name__, str(e)
+                )
+                error = InternalError()
         finally:
             destroy_context()
         return self.marshal(result, error, _id)
-- 
1.6.3.3

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to