Changeset 2165 for pykota

Show
Ignore:
Timestamp:
03/11/05 08:39:58 (20 years ago)
Author:
jerome
Message:

Avoids launching non-executable backends during device enumeration

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/cupspykota

    r2164 r2165  
    662662            # we will execute each existing backend in device enumeration mode 
    663663            # and generate their PyKota accounting counterpart 
    664             for backend in [os.path.join(directory, b) for b in os.listdir(directory) if os.path.isfile(os.path.join(directory, b)) and (b != myname)] : 
     664            allbackends = [ os.path.join(directory, b) \ 
     665                                for b in os.listdir(directory)  
     666                                    if os.access(os.path.join(directory, b), os.X_OK) \ 
     667                                        and (b != myname)]  
     668            for backend in allbackends :                             
    665669                answer = os.popen(backend, "r") 
    666670                try :