Changeset feccd33 in osmose-backend


Ignore:
Timestamp:
Oct 28, 2012 8:10:02 PM (6 years ago)
Author:
Jocelyn Jaubert <jocelyn.jaubert@…>
Branches:
master
Children:
8a1307c
Parents:
85475cf
git-author:
Jocelyn Jaubert <jocelyn.jaubert@…> (28/10/2012 18:46:40)
git-committer:
Jocelyn Jaubert <jocelyn.jaubert@…> (28/10/2012 20:10:02)
Message:

Move analysers to a sub-directory

Files:
3 added
1 edited
54 moved

Legend:

Unmodified
Added
Removed
  • osmose_run.py

    r0b643d7 rfeccd33  
    367367 
    368368    (options, args) = parser.parse_args() 
    369      
     369    
     370    analysers_path = os.path.join(os.path.dirname(__file__), "analysers") 
     371  
    370372    if options.list_analyser: 
    371         for fn in sorted(os.listdir(os.path.dirname(__file__))): 
     373        for fn in sorted(os.listdir(analysers_path)): 
    372374            if fn.startswith("analyser_") and fn.endswith(".py"): 
    373375                print fn[9:-3] 
     
    389391    # chargement des analysers 
    390392     
     393    old_path = list(sys.path) 
     394    sys.path.insert(0, analysers_path) 
     395 
    391396    analysers = {} 
    392     for fn in os.listdir(os.path.dirname(__file__)): 
     397    for fn in os.listdir(analysers_path): 
    393398        if fn.startswith("analyser_") and fn.endswith(".py"): 
    394399            if options.analyser and fn[:-3] not in options.analyser: 
     
    401406                logger.log(log_av_b+"not found "+fn[:-3]+log_ap) 
    402407             
     408    sys.path[:] = old_path # restore previous path 
     409 
    403410    #===================================== 
    404411    # analyse 
Note: See TracChangeset for help on using the changeset viewer.