def sftp_mkdir(dir):
    (basedir, dirname) = os.path.split(dir)
    if (not basedir):
        basedir = '.'
    try:
        cmd_str = ('\ncd %s\n-mkdir %s\n' % (basedir, dirname))
        cmd(("Creating '%s' in '%s' in your Apache home directory if it does not exist (errors are ok if the directory already exists)" % (dirname, basedir)), ('sftp -b - example@example.com' % apache_id), stdin=cmd_str, allow_failure=True)
    except subprocess.CalledProcessError:
        pass
def sftp_mkdir(dir):
    (basedir, dirname) = os.path.split(dir)
    if (not basedir):
        basedir = '.'
    try:
        cmd_str = ('\ncd %s\n-mkdir %s\n' % (basedir, dirname))
        cmd(("Creating '%s' in '%s' in your Apache home directory if it does not exist (errors are ok if the directory already exists)" % (dirname, basedir)), ('sftp -b - example@example.com' % apache_id), stdin=cmd_str, allow_failure=True)
    except subprocess.CalledProcessError:
        pass