mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Fix missing import of ConnectionError
- Update exception handler for uninstaller to convert set to str Signed-off-by: Dan Ryan <dan@danryan.co>
This commit is contained in:
@@ -232,12 +232,12 @@ class VirtualenvCreationException(VirtualenvException):
|
||||
class UninstallError(PipenvException):
|
||||
def __init__(self, package, command, return_values, return_code, **kwargs):
|
||||
extra = [crayons.blue("Attempted to run command: {0}".format(
|
||||
crayons.yellow("$ {0}".format(command), bold=True)
|
||||
crayons.yellow("$ {0!r}".format(command), bold=True)
|
||||
)),]
|
||||
extra.extend([crayons.blue(line.strip()) for line in return_values.splitlines()])
|
||||
if isinstance(package, (tuple, list)):
|
||||
if isinstance(package, (tuple, set, list)):
|
||||
package = " ".join(package)
|
||||
message = "{0} {1}...".format(
|
||||
message = "{0!s} {1!s}...".format(
|
||||
crayons.normal("Failed to uninstall package(s)"),
|
||||
crayons.yellow(package, bold=True)
|
||||
)
|
||||
|
||||
@@ -552,6 +552,7 @@ class Resolver(object):
|
||||
return cleaned_checksums
|
||||
|
||||
def collect_hashes(self, ireq):
|
||||
from requests import ConnectionError
|
||||
collected_hashes = []
|
||||
if ireq in self.hashes:
|
||||
collected_hashes += list(self.hashes.get(ireq, []))
|
||||
|
||||
Reference in New Issue
Block a user