Changeset 4328

Show
Ignore:
Timestamp:
03/08/09 12:36:59 (4 years ago)
Author:
gpolo
Message:

Fixed ticket #238: assume the process is still running if an error different than "No such process" is returned.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/umit/core/BGProcess.py

    r4240 r4328  
    4141        pid = self._get_pid() 
    4242        if isinstance(pid, int): 
    43             return not bool(self._stopped(pid)) 
     43            res = self._stopped(pid) 
     44            if isinstance(res, tuple): 
     45                # It is assumed the process is still running if it gives an 
     46                # error different than "No such process". 
     47                return True 
     48            else: 
     49                return not bool(res) 
    4450        else: 
    4551            return False