コード例 #1
0
def normalize_path_for_engine(path):
    """Windows paths, c:\my\path\shiny, need to be changed to be compatible with
    the Engine. Volume paths are expected to be linux style /c/my/path/shiny/
    """
    drive, tail = splitdrive(path)

    if drive:
        path = '/' + drive.lower().rstrip(':') + tail

    return path.replace('\\', '/')
コード例 #2
0
ファイル: types.py プロジェクト: daimor/compose
def normalize_path_for_engine(path):
    """Windows paths, c:\my\path\shiny, need to be changed to be compatible with
    the Engine. Volume paths are expected to be linux style /c/my/path/shiny/
    """
    drive, tail = splitdrive(path)

    if drive:
        path = '/' + drive.lower().rstrip(':') + tail

    return path.replace('\\', '/')
コード例 #3
0
 def separate_next_section(volume_config):
     drive, tail = splitdrive(volume_config)
     parts = tail.split(':', 1)
     if drive:
         parts[0] = drive + parts[0]
     return parts
コード例 #4
0
ファイル: types.py プロジェクト: daimor/compose
 def separate_next_section(volume_config):
     drive, tail = splitdrive(volume_config)
     parts = tail.split(':', 1)
     if drive:
         parts[0] = drive + parts[0]
     return parts