patch for certmaster rhel3 compatibility

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

 



 The following patch, plus python logging module and timeoutsocket module
 are initial steps towards rhel3 compatibility.

 I've attached the timeoutsocket.py module I have, which took a slight
 change to a method to be compatible with py2.3+ socket.(See attached file:
 timeoutsocket.py)

 I can provide the rpm I built for logging based on the module i got
here: http://www.red-dove.com/python_logging.html

 -greg

 diff --git a/certmaster/config.py b/certmaster/config.py
 index e859f4a..b14d260 100644
 --- a/certmaster/config.py
 +++ b/certmaster/config.py
 @@ -14,6 +14,7 @@
  # Copyright 2002 Duke University
  # filched from yum  - menno smits wrote this - he rocks

 +from __future__ import generators

  import os
  import sys
 @@ -75,7 +76,7 @@ class Option(object):
         @return: Nothing.
         '''
         # Only try to parse if its a string
 -        if isinstance(value, basestring):
 +        if isinstance(value, (str, unicode)):
             try:
                 value = self.parse(value)
             except ValueError, e:
 diff --git a/certmaster/utils.py b/certmaster/utils.py
 index 958d26d..1117c6d 100755
 --- a/certmaster/utils.py
 +++ b/certmaster/utils.py
 @@ -26,6 +26,11 @@ from commonconfig import MinionConfig
  import logger
  import sub_process

 +try:
 +    socket.socket.settimeout
 +except:
 +    import timeoutsocket
 +
  # FIXME: module needs better pydoc

Attachment: timeoutsocket.py
Description: Binary data

_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list

[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux