Skip to content

Commit

Permalink
fixup! Highlight that the --revert option can be utilized in the even…
Browse files Browse the repository at this point in the history
…t of a conversion failure
  • Loading branch information
Mikhail Sandakov committed Apr 11, 2024
1 parent eaa7831 commit 3fba8f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 4 additions & 1 deletion pleskdistup/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,12 @@ def handle_error(
print(line, end='')
error_message += line

# When adding something to the additional_message, remember to include '\n' at the beginning.
# This is because the FAIL_MESSAGE_TAIL contains the additional_message at the end of the previous line,
# preventing an empty line if there is nothing inside the additional_message.
additional_message = ""
if phase is Phase.CONVERT:
additional_message = "To revert the server to its original state, call 'centos2alma --revert'."
additional_message = f"\nTo revert the server to its original state, call '{util_name} --revert'."
print(messages.FAIL_MESSAGE_TAIL.format(util_name=util_name, logfile_path=logfile_path, additional_message=additional_message), end='')

plesk.send_error_report(error_message)
Expand Down
3 changes: 1 addition & 2 deletions pleskdistup/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
\033[91m**************************************************************************************
The dist-ugrade process has failed. See the {logfile_path} file for more information.
The last 100 lines of the file are shown above.
For assistance, call '{util_name} --prepare-feedback' and follow the instructions.
{additional_message}
For assistance, call '{util_name} --prepare-feedback' and follow the instructions.{additional_message}
**************************************************************************************\033[0m
"""

Expand Down

0 comments on commit 3fba8f6

Please sign in to comment.