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

extras-buildsys/utils package-builder.py,1.3,1.4



Author: dcbw

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

Modified Files:
	package-builder.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: package-builder.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/utils/package-builder.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- package-builder.py	15 Jun 2005 05:14:04 -0000	1.3
+++ package-builder.py	17 Jun 2005 03:10:30 -0000	1.4
@@ -77,9 +77,9 @@
     target = args[2]
     use_ssl = config.get('Server', 'use_ssl')
     if use_ssl.lower() == 'true':
-        (e, msg, uid) = server.enqueue(package, srpm, target)
+        (e, msg, uid) = server.enqueue_srpm(package, srpm, target)
     else:
-        (e, msg, uid) = server.enqueue(email, package, srpm, target)
+        (e, msg, uid) = server.enqueue_srpm(email, package, srpm, target)
     print "Package %s enqueued with UID %d" % (package, uid)
 
 
@@ -189,7 +189,12 @@
             print "%s does not exist or is not readable." % certfile
             sys.exit(1)
         cert = M2Crypto.X509.load_cert(certfile)
-        cert_email = cert.get_subject().emailAddress
+        # m2crypto 0.9 only has 'Email', so fall through to that
+        # if 'emailAddress' fails
+        try:
+            cert_email = cert.get_subject().emailAddress
+        except AttributeError:
+            cert_email = cert.get_subject().Email
         if cert_email != config_email:
             print "Error: certificate's email address does not match the email address in the config file."
             sys.exit(1)


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