"""
Create the app's instance dir.
"""

import os
import shutil

from pkg_resources import resource_filename

STUB_HTML = resource_filename('tsapp', 'resources/stub.html')


def make_instance(target):
    """
    Create a new app instance dir.
    """
    if os.sep in target:
        raise IOError('%s not allowed in target' % os.sep)

    # these will OSError if the dirs exist
    os.mkdir(target)
    os.mkdir(os.path.join(target, 'assets'))

    shutil.copyfile(STUB_HTML, os.path.join(target, 'index.html'))

0666fc3b404f364e38013c9f8cfe62e09d9b5f66
<mask token>

<mask token>


def make_instance(target):
    """
    Create a new app instance dir.
    """
    if os.sep in target:
        raise IOError('%s not allowed in target' % os.sep)
    os.mkdir(target)
    os.mkdir(os.path.join(target, 'assets'))
    shutil.copyfile(STUB_HTML, os.path.join(target, 'index.html'))

<mask token>
STUB_HTML = resource_filename('tsapp', 'resources/stub.html')


def make_instance(target):
    """
    Create a new app instance dir.
    """
    if os.sep in target:
        raise IOError('%s not allowed in target' % os.sep)
    os.mkdir(target)
    os.mkdir(os.path.join(target, 'assets'))
    shutil.copyfile(STUB_HTML, os.path.join(target, 'index.html'))

<mask token>
import os
import shutil
from pkg_resources import resource_filename
STUB_HTML = resource_filename('tsapp', 'resources/stub.html')


def make_instance(target):
    """
    Create a new app instance dir.
    """
    if os.sep in target:
        raise IOError('%s not allowed in target' % os.sep)
    os.mkdir(target)
    os.mkdir(os.path.join(target, 'assets'))
    shutil.copyfile(STUB_HTML, os.path.join(target, 'index.html'))

"""
Create the app's instance dir.
"""

import os
import shutil

from pkg_resources import resource_filename

STUB_HTML = resource_filename('tsapp', 'resources/stub.html')


def make_instance(target):
    """
    Create a new app instance dir.
    """
    if os.sep in target:
        raise IOError('%s not allowed in target' % os.sep)

    # these will OSError if the dirs exist
    os.mkdir(target)
    os.mkdir(os.path.join(target, 'assets'))

    shutil.copyfile(STUB_HTML, os.path.join(target, 'index.html'))
