tmt/utils.py
def create_directory(path, name, quiet=False):
    """ Create a new directory, handle errors """
    say = log.debug if quiet else echo
    if os.path.isdir(path):
        say("Directory '{}' already exists.".format(path))
        return
    try:
        os.makedirs(path, exist_ok=True)
        say("Directory '{}' created.".format(path))
    except OSError as error:
        raise GeneralError("Failed to create {} '{}' ({})".format(
            name, path, error))
 Create a new directory, handle errors 
Create a new directory, handle errors
Create a new directory handle errors
def create_directory(path, name, quiet=False):
    say = log.debug if quiet else echo
    if os.path.isdir(path):
        say("Directory '{}' already exists.".format(path))
        return
    try:
        os.makedirs(path, exist_ok=True)
        say("Directory '{}' created.".format(path))
    except OSError as error:
        raise GeneralError("Failed to create {} '{}' ({})".format(
            name, path, error))
def create_directory ( path , name , quiet = False ) : say = log . debug if quiet else echo if os . path . isdir ( path ) : say ( "Directory '{}' already exists." . format ( path ) ) return try : os . makedirs ( path , exist_ok = True ) say ( "Directory '{}' created." . format ( path ) ) except OSError as error : raise GeneralError ( "Failed to create {} '{}' ({})" . format ( name , path , error ) )
Create a new directory, handle errors
Create a new directory handle errors
""" Create a new directory, handle errors """
path
name
quiet