Skip to content

Commit

Permalink
More error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Secrus committed May 19, 2022
1 parent ccc21fd commit e373958
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/poetry/utils/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import hashlib
import itertools
import json
import logging
import os
import platform
import re
Expand Down Expand Up @@ -38,6 +39,7 @@
from poetry.core.utils.helpers import temporary_directory
from virtualenv.seed.wheels.embed import get_embed_wheel

from poetry.exceptions import PoetryException
from poetry.locations import CACHE_DIR
from poetry.utils._compat import decode
from poetry.utils._compat import encode
Expand All @@ -52,6 +54,7 @@
from cleo.io.io import IO
from poetry.core.version.markers import BaseMarker

logger = logging.getLogger(__name__)

P = TypeVar("P", bound=Poetry)

Expand Down Expand Up @@ -1638,7 +1641,7 @@ def get_pip_command(self, embedded: bool = False) -> list[str]:

def get_supported_tags(self) -> list[Tag]:
if self.get_version_info() < (3, 0, 0):
raise NotImplementedError("Poetry does not support python 2.7 environments")
raise PoetryException("Poetry does not support python 2.7 environments")
else:
output = self.run_python_script(GET_SYS_TAGS)

Expand Down

0 comments on commit e373958

Please sign in to comment.