def METHOD_NAME(dname):
    "create directory"
    if not os.path.exists(dname):
        try:
            os.mkdir(dname)
        except PermissionError:
            log_warning(f'no permission to create directory {dname}')
        except (OSError, TypeError):
            log_error(sys.exc_info()[1])