1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Check if there is no filename in exc

This commit is contained in:
q0w 2022-02-03 14:22:10 +03:00
parent cfcb4e9221
commit 332e960ecf

View file

@ -13,7 +13,6 @@ from pip._internal.configuration import (
kinds,
)
from pip._internal.exceptions import PipError
from pip._internal.utils.compat import WINDOWS
from pip._internal.utils.logging import indent_log
from pip._internal.utils.misc import get_prog, write_output
@ -227,7 +226,7 @@ class ConfigurationCommand(Command):
try:
subprocess.check_call([editor, fname])
except FileNotFoundError as e:
if WINDOWS:
if not e.filename:
e.filename = editor
raise
except subprocess.CalledProcessError as e: