X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/2082a325fdd14f0aabd88f7f12a20f9fb085c538..a497570fcb364b40e0d952d3133e8d4f2d329fea:/src/blackd/__init__.py diff --git a/src/blackd/__init__.py b/src/blackd/__init__.py index d79bfe7..f77a5e8 100644 --- a/src/blackd/__init__.py +++ b/src/blackd/__init__.py @@ -1,13 +1,24 @@ import asyncio +import logging +import sys from concurrent.futures import Executor, ProcessPoolExecutor from datetime import datetime from functools import partial -import logging from multiprocessing import freeze_support from typing import Set, Tuple -from aiohttp import web -import aiohttp_cors +try: + from aiohttp import web + import aiohttp_cors +except ImportError as ie: + print( + f"aiohttp dependency is not installed: {ie}. " + + "Please re-install black with the '[d]' extra install " + + "to obtain aiohttp_cors: `pip install black[d]`", + file=sys.stderr, + ) + sys.exit(-1) + import black import click