Update of /cvsroot/freevo/freevo/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20756/src

Modified Files:
        childapp.py cleanup.py 
Log Message:
use popen from notifier and remove util.popen

Index: cleanup.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/cleanup.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** cleanup.py  16 Jun 2005 15:54:36 -0000      1.8
--- cleanup.py  28 Jun 2005 15:56:07 -0000      1.9
***************
*** 10,38 ****
  # -----------------------------------------------------------------------
  # $Log$
  # Revision 1.8  2005/06/16 15:54:36  dischi
  # update system exit
  #
- # Revision 1.7  2005/06/04 17:18:10  dischi
- # adjust to gui changes
- #
- # Revision 1.6  2005/05/07 19:13:09  dischi
- # move config import (FIXME)
- #
- # Revision 1.5  2005/04/10 18:08:05  dischi
- # switch to new mediainfo module
- #
- # Revision 1.4  2004/12/18 13:39:08  dischi
- # wait using the notifier, stop popen children
- #
- # Revision 1.3  2004/11/20 18:22:58  dischi
- # use python logger module for debug
- #
- # Revision 1.2  2004/10/08 20:18:52  dischi
- # plugins register to cleanup, no need to call plugin.cleanup()
- #
- # Revision 1.1  2004/10/06 18:44:51  dischi
- # move shutdown code from plugin to cleanup.py
- #
- #
  # -----------------------------------------------------------------------
  # Freevo - A Home Theater PC framework
--- 10,19 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.9  2005/06/28 15:56:07  dischi
+ # use popen from notifier and remove util.popen
+ #
  # Revision 1.8  2005/06/16 15:54:36  dischi
  # update system exit
  #
  # -----------------------------------------------------------------------
  # Freevo - A Home Theater PC framework
***************
*** 60,66 ****
  import sys
  import copy
- import notifier
- 
  import logging
  log = logging.getLogger()
  
--- 41,48 ----
  import sys
  import copy
  import logging
+ 
+ import kaa.notifier
+ 
  log = logging.getLogger()
  
***************
*** 93,97 ****
      # to do this on startup (recursive imports)
      # FIXME: this is bad coding style
-     import util.popen
      import mediadb
      import gui
--- 75,78 ----
***************
*** 138,142 ****
              log.debug('shutting down %s' % c[ 0 ])
              c[ 0 ]( *c[ 1 ] )
!         util.popen.killall()
          _callbacks = []
          gui.displays.shutdown()
--- 119,126 ----
              log.debug('shutting down %s' % c[ 0 ])
              c[ 0 ]( *c[ 1 ] )
! 
!         # shutdown processes
!         kaa.notifier.shutdown()
! 
          _callbacks = []
          gui.displays.shutdown()
***************
*** 147,151 ****
              os.system(config.RESTART_SYS_CMD)
          # let freevo be killed by init, looks nicer for mga
!         notifier.loop()
          return
  
--- 131,135 ----
              os.system(config.RESTART_SYS_CMD)
          # let freevo be killed by init, looks nicer for mga
!         kaa.notifier.loop()
          return
  
***************
*** 160,164 ****
      _callbacks = []
  
!     util.popen.killall()
  
      # Shutdown the display
--- 144,149 ----
      _callbacks = []
  
!     # shutdown processes
!     kaa.notifier.shutdown()
  
      # Shutdown the display
***************
*** 172,174 ****
  
      # Just wait until we're dead. SDL cannot be polled here anyway.
!     notifier.loop()
--- 157,159 ----
  
      # Just wait until we're dead. SDL cannot be polled here anyway.
!     kaa.notifier.loop()

Index: childapp.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/childapp.py,v
retrieving revision 1.73
retrieving revision 1.74
diff -C2 -d -r1.73 -r1.74
*** childapp.py 1 Jun 2005 19:01:23 -0000       1.73
--- childapp.py 28 Jun 2005 15:56:06 -0000      1.74
***************
*** 5,14 ****
  # $Id$
  #
! # Run a child application inside Freevo. The class is based util.popen and
! # send events on start/stop. It is also possible to shut down the gui when
! # the child is starting.
! #
! # TODO: o remove doeslogging, debugname
! #       o better handling of stop_osd and is_video
  #
  # 
-----------------------------------------------------------------------------
--- 5,10 ----
  # $Id$
  #
! # Run a child application inside Freevo. This file will be removed. Please
! # use application.ChildApp.
  #
  # 
-----------------------------------------------------------------------------
***************
*** 43,56 ****
  import os
  
  # Freevo imports
  import sysconfig
  import config
  import eventhandler
- import util.popen
  import gui
  
  from event import *
  
! class Instance(util.popen.Process):
      def __init__( self, app, debugname = None, doeslogging = 0, prio = 0,
                    stop_osd = 2 ):
--- 39,54 ----
  import os
  
+ # kaa imports
+ import kaa.notifier
+ 
  # Freevo imports
  import sysconfig
  import config
  import eventhandler
  import gui
  
  from event import *
  
! class Instance(kaa.notifier.Process):
      def __init__( self, app, debugname = None, doeslogging = 0, prio = 0,
                    stop_osd = 2 ):
***************
*** 83,93 ****
            debugname = sysconfig.logfile(debugname)
        
!         util.popen.Process.__init__(self, app, debugname,
!                                     callback=self.finished)
  
          if prio and config.CONF.renice:
              os.system('%s %s -p %s 2>/dev/null >/dev/null' % \
                        (config.CONF.renice, prio, self.child.pid))
!             
          
  
--- 81,99 ----
            debugname = sysconfig.logfile(debugname)
        
!         kaa.notifier.Process.__init__(self, app, debugname,
!                                       callback=self.finished)
  
          if prio and config.CONF.renice:
              os.system('%s %s -p %s 2>/dev/null >/dev/null' % \
                        (config.CONF.renice, prio, self.child.pid))
! 
! 
!     def stop(self, cmd = ''):
!         """
!         Stop child and wait.
!         """
!         kaa.notifier.Process.stop(self, cmd)
!         while self.is_alive():
!             notifier.step()
          
  



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to