Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions src/manage/pep514utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@

# Existing key is almost certainly not valid, so let's rename it,
# warn the user, and then continue.
LOGGER.debug("Key %s appears invalid, so moving it and taking it for this "
"new install", tag_name)
LOGGER.debug("Registry key %s appears invalid, so moving it and taking it "
"for this new install", tag_name)
try:
from _native import reg_rename_key
except ImportError:
Expand Down Expand Up @@ -235,10 +235,12 @@
winreg.SetValueEx(tag, "ManagedByPyManager", None, winreg.REG_DWORD, 1)
_update_reg_values(tag, data, install, {"kind", "Key", "ManagedByPyManager"})
else:
LOGGER.warn("A runtime matching %s is already installed, and so "
"the new one has not been registered.", data["Key"])
LOGGER.info("To register the new installation, remove the existing "
"runtime and then run 'py install --refresh'",)
LOGGER.warn("An existing runtime is registered at %s in the registry, "

Check warning on line 238 in src/manage/pep514utils.py

View check run for this annotation

Codecov / codecov/patch

src/manage/pep514utils.py#L238

Added line #L238 was not covered by tests
"and so the new one has not been registered.", data["Key"])
LOGGER.info("This may prevent some other applications from detecting "

Check warning on line 240 in src/manage/pep514utils.py

View check run for this annotation

Codecov / codecov/patch

src/manage/pep514utils.py#L240

Added line #L240 was not covered by tests
"the new installation, although 'py -V:...' will work. "
"To register the new installation, remove the existing "
"runtime and then run 'py install --refresh'")


def cleanup_registry(root_name, keep):
Expand Down Expand Up @@ -350,8 +352,8 @@
try:
yield _read_one_unmanaged_install(company_name, tag_name, is_core, tag)
except Exception:
LOGGER.debug("Failed to read %s\\%s registration", company_name, tag_name)
LOGGER.debug("ERROR", exc_info=True)
LOGGER.debug("Failed to read %s\\%s registration",

Check warning on line 355 in src/manage/pep514utils.py

View check run for this annotation

Codecov / codecov/patch

src/manage/pep514utils.py#L355

Added line #L355 was not covered by tests
company_name, tag_name, exc_info=True)


def _get_store_installs():
Expand Down