gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject cvs commit: gump/python/gump/utils launcher.py
Date Mon, 05 Apr 2004 16:03:50 GMT
ajack       2004/04/05 09:03:50

  Modified:    python/gump/document forrest.py
               python/gump/utils launcher.py
  Log:
  Deal with multiple code paths.
  
  Revision  Changes    Path
  1.129     +1 -1      gump/python/gump/document/forrest.py
  
  Index: forrest.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/document/forrest.py,v
  retrieving revision 1.128
  retrieving revision 1.129
  diff -u -r1.128 -r1.129
  --- forrest.py	5 Apr 2004 13:38:00 -0000	1.128
  +++ forrest.py	5 Apr 2004 16:03:49 -0000	1.129
  @@ -513,7 +513,7 @@
           
                   ncount+=1
                   
  -        if not ncount: notesTable.createLine('None')
  +        if not ncount: notesSection.createParagraph('None.')
           
           document.serialize()
              
  
  
  
  1.18      +14 -12    gump/python/gump/utils/launcher.py
  
  Index: launcher.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/utils/launcher.py,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- launcher.py	5 Apr 2004 15:53:10 -0000	1.17
  +++ launcher.py	5 Apr 2004 16:03:49 -0000	1.18
  @@ -401,16 +401,19 @@
               
           #############################################################                
           log.debug('Executing: ' + execString + ' (Output to ' + str(outputFile) + ')')
  -            
  -        # Allow use of 'timeout N cmd args'
  -        if setting.timeoutCommand:
  -            execString='timeout ' + str(timeout) + ' ' + execString
  -        else:
  -            # Set the signal handler and an N-second alarm
  -            timeout=cmd.timeout or setting.timeout
  -            timer = Timer(timeout, killChildProcesses)
  -            timer.setDaemon(1)
  -            timer.start()
  +         
  +        # Set the signal handler and an N-second alarm
  +        timer=None
  +        timeout=cmd.timeout or setting.timeout
  +        
  +        if timeout:
  +            # Allow use of 'timeout N cmd args'
  +            if setting.timeoutCommand:
  +                execString='timeout ' + str(timeout) + ' ' + execString
  +            else:
  +                timer = Timer(timeout, killChildProcesses)
  +                timer.setDaemon(1)
  +                timer.start()
   
           #
           # Execute Command & Wait
  @@ -450,11 +453,10 @@
           else:
               result.state=CMD_STATE_SUCCESS                
               
  -    
           #
           # Stop it (if still running)
           #
  -        timer.cancel()            
  +        if timer: timer.cancel()            
                       
         except Exception, details :
           log.error('Failed to launch command. Details: ' + str(details))
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Mime
View raw message