Skip to content

Commit

Permalink
Merge pull request #29 from plesk/prepare-feedback-on-finish
Browse files Browse the repository at this point in the history
Use the default upgrader for feedback preparation if resume file not found
  • Loading branch information
SandakovMM authored Apr 17, 2024
2 parents 8d26738 + 7e586c9 commit 55062f0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pleskdistup/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,13 @@ def main():
except Exception as ex:
ex_info = traceback.format_exc()
log.warn(f"Couldn't get upgrader name from {options.resume_path!r}: {ex}\n{ex_info}")
upgraders = list(pleskdistup.registry.iter_upgraders())
if len(upgraders) == 1:
options.upgrader_name = upgraders[0].upgrader_name
log.debug(f"Use only available upgrader {options.upgrader_name} for feedback preparation")
else:
printerr(f"Couldn't get upgrader name for feedback preparation. Please provide upgrader name by --upgrader-name. Available upgraders: {upgraders}")
return 1

distro = dist.get_distro()
log.debug(f"Detected current OS distribution as {distro}")
Expand Down

0 comments on commit 55062f0

Please sign in to comment.