[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

extras-buildsys/common SSLCommon.py, 1.2, 1.3 SimpleSSLXMLRPCServer.py, 1.4, 1.5



Author: dcbw

Update of /cvs/fedora/extras-buildsys/common
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22353/common

Modified Files:
	SSLCommon.py SimpleSSLXMLRPCServer.py 
Log Message:
2005-06-16  Dan Williams <dcbw redhat com>

	* common/SSLCommon.py
		- Override SSL.SSLServer's handle_error() method since it doesn't
			take the right number of arguments

	* common/SimpleSSLXMLRPCServer.py
		- Add proxy lcl_resolve_dotted_attribute() function to deal with
			different versions of python

	* server/BuildJob.py
		- email_to -> self.username in email_result()

	* server/UserInterface.py
		- email_to -> email in email_result()
		- Fix typo that broke simple SRPM building (cvs_tag -> srpm_file)

	* server/buildserver.py
		- Deal with m2crypto 0.09 X509 cert handling of 'emailAddress'/'Email'

	* utils/package-builder.py
		- Deal with m2crypto 0.09 X509 cert handling of 'emailAddress'/'Email'
		- Fix simple SRPM building, our local enqueue_srpm() function was calling
			just enqueue() on the server




Index: SSLCommon.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/common/SSLCommon.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SSLCommon.py	14 Jun 2005 01:16:30 -0000	1.2
+++ SSLCommon.py	17 Jun 2005 03:10:28 -0000	1.3
@@ -64,3 +64,12 @@
                 pass
             else:
                 self.handle_error(request, client_address)
+
+    # Override M2Crypto's SSL.SSLServer handle_error, which 
+    # doesn't accept the same arguments as SocketServer
+    def handle_error(self, request, client_address):
+        print '-'*40
+        import traceback
+        traceback.print_exc()
+        print '-'*40
+


Index: SimpleSSLXMLRPCServer.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/common/SimpleSSLXMLRPCServer.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- SimpleSSLXMLRPCServer.py	14 Jun 2005 22:09:04 -0000	1.4
+++ SimpleSSLXMLRPCServer.py	17 Jun 2005 03:10:28 -0000	1.5
@@ -139,11 +139,7 @@
             if self.instance is not None:
                 # call instance method directly
                 try:
-                    func = SimpleXMLRPCServer.resolve_dotted_attribute(
-                        self.instance,
-                        method,
-                        self.allow_dotted_names
-                        )
+                    func = self.lcl_resolve_dotted_attribute(method)
                 except AttributeError:
                     pass
 
@@ -156,3 +152,14 @@
                 return func(*params)
         else:
             raise Exception('method "%s" is not supported' % method)
+
+    # Sigh.  Different versions of M2Crypto have this in different places
+    def lcl_resolve_dotted_attribute(self, method):
+        pyver = sys.version_info[:3]
+        if pyver <= (2, 3, 4):
+            return SimpleXMLRPCServer.resolve_dotted_attribute(
+                self.instance, method)
+        elif pyver > (2, 3, 4):
+            return SimpleXMLRPCServer.resolve_dotted_attribute(
+                self.instance, method, self.allow_dotted_names)
+


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]