ajack       2003/10/17 12:04:12

  Modified:    python/gump launcher.py utils.py document.py
  Log:
  Still struggling w/ non-ASCII, trying more protection...
  
  Revision  Changes    Path
  1.16      +4 -2      jakarta-gump/python/gump/launcher.py
  
  Index: launcher.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/launcher.py,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- launcher.py       16 Oct 2003 20:22:04 -0000      1.15
  +++ launcher.py       17 Oct 2003 19:04:12 -0000      1.16
  @@ -272,8 +272,10 @@
   
   def killChildren():
       pid=os.getpid()
  -    log.info('Kill all children (anything launched by Gumpy) [PID' + str(pid) + 
']')    
  -    os.system('pkill -KILL -P ' + str(pid))
  +    log.warning('Kill all children (anything launched by Gumpy) [PID' + str(pid) + 
']')    
  +    command='pkill -KILL -P ' + str(pid)
  +    exitcode=os.system(command)
  +    log.warning('Command: [' + command + '] exited with [' + str(exitcode) + ']')
       
   #
   # Kill the children 
  
  
  
  1.7       +2 -2      jakarta-gump/python/gump/utils.py
  
  Index: utils.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/utils.py,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- utils.py  17 Oct 2003 18:33:12 -0000      1.6
  +++ utils.py  17 Oct 2003 19:04:12 -0000      1.7
  @@ -203,12 +203,12 @@
   def getStringFromUnicode(u):
       try:
           s = str(u)
  -    except UnicodeException:
  +    except UnicodeError:
           s = ''
           for uc in u:
               try:
                   sc = uc.encode('latin-1')            
  -            except UnicodeException:
  +            except UnicodeError:
                   sc = '_'
               # Add character by character
               s += sc
  
  
  
  1.80      +6 -4      jakarta-gump/python/gump/document.py
  
  Index: document.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/document.py,v
  retrieving revision 1.79
  retrieving revision 1.80
  diff -u -r1.79 -r1.80
  --- document.py       17 Oct 2003 18:30:49 -0000      1.79
  +++ document.py       17 Oct 2003 19:04:12 -0000      1.80
  @@ -73,6 +73,7 @@
   from gump import log, gumpSafeName
   from gump.conf import *
   from gump.xdoc import *
  +from gump.utils import *
   from gump.xmlutils import xmlize
   from gump.context import *
   from gump.model import *
  @@ -664,8 +665,8 @@
           
       # Display nag information
       for nagEntry in project.nag:
  -        toaddr=getattr(nagEntry,'to',workspace.mailinglist)
  -        fromaddr=getStringFromUnicode(getattr(nagEntry,'from',workspace.email))
  +        toaddr=getattr(nagEntry,'to') or workspace.mailinglist
  +        fromaddr=getStringFromUnicode(getattr(nagEntry,'from') or workspace.email)
           addItemXDoc(x,"Nag To: ", toaddr)
           addItemXDoc(x,"Nag From: ", fromaddr)     
           
  @@ -1272,7 +1273,7 @@
       return f
   
   def headerXDoc(f,title):
  -    f.write('<?xml version="1.0" encoding="UTF-8"?>\n')
  +    f.write('<?xml version="1.0" encoding="ISO-8859-1"?>\n')
       f.write('<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" 
"./dtd/document-v11.dtd">\n')
       f.write('<!-- Automatically Generated by Python Gump: 
http://jakarta.apache.org/gump -->\n\n')
       f.write('<document>\n')
  @@ -1344,7 +1345,8 @@
       f.write('    <ul>\n');
       
   def addItemXDoc(f,t,i=''):
  -    f.write('      <li><strong>%s</strong>%s</li>\n' % (t,i))
  +    f.write('      <li><strong>%s</strong>%s</li>\n' % \
  +                (escape(str(t)),escape(str(i))))
       
   def addXItemXDoc(f,t,i=None):
       if i:
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to