Skip to content

Commit

Permalink
Merge pull request #226 from plesk/release-1.2.4
Browse files Browse the repository at this point in the history
Release 1.2.4
  • Loading branch information
SandakovMM authored Apr 1, 2024
2 parents 2bc391e + 28aa976 commit f214386
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion BUCK
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright 1999-2024. WebPros International GmbH. All rights reserved.
# vim:ft=python:

PRODUCT_VERSION = '1.2.3'
PRODUCT_VERSION = '1.2.4'

genrule(
name = 'version',
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ To retrieve the latest available version of the tool, please navigate to the "Re

To prepare the latest version of the tool for use from a command line, please run the following commands:
```shell
> wget https://github.com/plesk/centos2alma/releases/download/v1.2.3/centos2alma-1.2.3.zip
> unzip centos2alma-1.2.3.zip
> wget https://github.com/plesk/centos2alma/releases/download/v1.2.4/centos2alma-1.2.4.zip
> unzip centos2alma-1.2.4.zip
> chmod 755 centos2alma
```

Expand Down
13 changes: 10 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def show_fail_motd() -> None:
motd.publish_finish_ssh_login_message()


def handle_error(error: str) -> None:
def handle_error(options: typing.Any, error: str) -> None:
sys.stdout.write("\n{}\n".format(error))
sys.stdout.write(messages.FAIL_MESSAGE_HEAD.format(DEFAULT_LOG_FILE))

Expand All @@ -332,7 +332,14 @@ def handle_error(error: str) -> None:
sys.stdout.write(line)
error_message += line

sys.stdout.write(messages.FAIL_MESSAGE_TAIL.format(DEFAULT_LOG_FILE))
additional_message = ""
if Stages.convert in options.stage:
additional_message = "To revert the server to its original state, call 'centos2alma --revert'."

sys.stdout.write(messages.FAIL_MESSAGE_TAIL.format(
path_to_log=DEFAULT_LOG_FILE,
additional_message=additional_message
))

plesk.send_error_report(error_message)
plesk.send_conversion_status(False)
Expand All @@ -352,7 +359,7 @@ def do_convert(options: typing.Any) -> None:
flow.validate_actions()
start_flow(flow)
if flow.is_failed():
handle_error(flow.get_error())
handle_error(options, flow.get_error())
return 1

if not options.no_reboot and (Stages.convert in options.stage or Stages.finish in options.stage):
Expand Down
3 changes: 2 additions & 1 deletion messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@

FAIL_MESSAGE_TAIL = """
\033[91m**************************************************************************************
The conversion process has failed. See the {} file for more information.
The conversion process has failed. See the {path_to_log} file for more information.
The last 100 lines of the file are shown above.
For assistance, call 'centos2alma --prepare-feedback' and follow the instructions.
{additional_message}
**************************************************************************************\033[0m
"""

Expand Down

0 comments on commit f214386

Please sign in to comment.