Ignore:
Timestamp:
10/17/19 06:03:43 (5 years ago)
Author:
bdef
Message:

Adding a substeping framework in hydro and part of smb

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/os/issmscpin.py

    r24213 r24240  
    99    """
    1010    ISSMSCPIN get packages from host, using scp on unix, and pscp on windows
    11 
    1211       usage: issmscpin(host, packages, path)
    1312    """
     
    1514    #first get hostname
    1615    hostname = gethostname()
    17 
    1816    #first be sure packages are not in the current directory, this could conflict with pscp on windows.
    1917    #remove warnings in case the files do not exist
     
    2321        except OSError as e:
    2422            pass
    25 
    2623    #if hostname and host are the same, do a simple copy
    27     if m.strcmpi(hostname, host):
    28 
     24    if hostname == host:
    2925        for package in packages:
    3026            try:
     
    3228            except OSError as e:
    3329                pass
    34 
    3530    else:
    3631        if m.ispc():
     
    4136            else:
    4237                raise OSError("issmscpin error message: could not find ISSM_DIR_WIN environment variable.")
    43 
    4438            username = eval(input('Username: (quoted string) '))
    4539            key = eval(input('Key: (quoted string) '))
    46 
    4740            for package in packages:
    4841                try:
    4942                    subprocess.check_call('%s/externalpackages/ssh/pscp.exe -l "%s" -pw "%s" %s:%s %s' % (ISSM_DIR, username, key, host, os.path.join(path, package), os.getcwd()), shell=True)
    5043                except CalledProcessError as e:
    51                     raise CalledProcessError("issmscpin error message: could not call putty pscp.")
     44                    raise CalledProcessError("issmscpin error message: could not call putty pscp due to ")
    5245
    5346        else:
Note: See TracChangeset for help on using the changeset viewer.