Changeset 23759


Ignore:
Timestamp:
02/27/19 01:10:48 (6 years ago)
Author:
bdef
Message:

BUG: fixing indent

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/dev/devpath.py

    r23755 r23759  
    1414    if '.svn' in dirs:
    1515        dirs.remove('.svn')
    16         for file in files:
    17             if file.find(".py") != -1:
    18                 if file.find(".pyc") == -1:
    19                     if root not in sys.path:
    20                         sys.path.append(root)
     16    for file in files:
     17        if file.find(".py") != -1:
     18            if file.find(".pyc") == -1:
     19                if root not in sys.path:
     20                    sys.path.append(root)
    2121
    2222#Also add the Nightly run directory
    23 sys.path.append(ISSM_DIR + '/test/NightlyRun')
    24 
    25 sys.path.append(ISSM_DIR + '/lib')
    26 sys.path.append(ISSM_DIR + '/src/wrappers/python/.libs')
     23if ISSM_DIR + '/test/NightlyRun' not in sys.path:
     24    sys.path.append(ISSM_DIR + '/test/NightlyRun')
     25if ISSM_DIR + '/lib' not in sys.path:
     26    sys.path.append(ISSM_DIR + '/lib')
     27if ISSM_DIR + '/src/wrappers/python/.libs' not in sys.path:
     28    sys.path.append(ISSM_DIR + '/src/wrappers/python/.libs')
    2729# If using clusters, we need to have the path to the cluster settings directory
    2830if JPL_SVN is not None:
    29     if os.path.exists(JPL_SVN + '/usr/' + USERNAME):
    30         sys.path.append(JPL_SVN + '/usr/' + USERNAME)
     31    jpl_path = JPL_SVN + '/usr/' + USERNAME
     32    if os.path.exists(jpl_path):
     33        if jpl_path not in sys.path:
     34            sys.path.append(jpl_path)
    3135    else:
    3236        warnings.warn('cluster settings should be in, {}/usr/{}'.format(JPL_SVN, USERNAME))
Note: See TracChangeset for help on using the changeset viewer.