def check_working_directories(runtimeContext: RuntimeContext) -> Optional[int]:
    'Make any needed working directories.'
    for dirprefix in ('tmpdir_prefix', 'tmp_outdir_prefix', 'cachedir'):
        if (getattr(runtimeContext, dirprefix) and (getattr(runtimeContext, dirprefix) != DEFAULT_TMP_PREFIX)):
            sl = ('/' if (getattr(runtimeContext, dirprefix).endswith('/') or (dirprefix == 'cachedir')) else '')
            setattr(runtimeContext, dirprefix, (os.path.abspath(getattr(runtimeContext, dirprefix)) + sl))
            if (not os.path.exists(os.path.dirname(getattr(runtimeContext, dirprefix)))):
                try:
                    os.makedirs(os.path.dirname(getattr(runtimeContext, dirprefix)))
                except Exception:
                    _logger.exception('Failed to create directory.')
                    return 1
    return None
Make any needed working directories.
def check_working_directories(runtimeContext: RuntimeContext) -> Optional[int]:
    
    for dirprefix in ('tmpdir_prefix', 'tmp_outdir_prefix', 'cachedir'):
        if (getattr(runtimeContext, dirprefix) and (getattr(runtimeContext, dirprefix) != DEFAULT_TMP_PREFIX)):
            sl = ('/' if (getattr(runtimeContext, dirprefix).endswith('/') or (dirprefix == 'cachedir')) else )
            setattr(runtimeContext, dirprefix, (os.path.abspath(getattr(runtimeContext, dirprefix)) + sl))
            if (not os.path.exists(os.path.dirname(getattr(runtimeContext, dirprefix)))):
                try:
                    os.makedirs(os.path.dirname(getattr(runtimeContext, dirprefix)))
                except Exception:
                    _logger.exception('Failed to create directory.')
                    return 1
    return None