Skip to content

Commit

Permalink
Add information about interrupted conversion/dist-upgrade to stdout a…
Browse files Browse the repository at this point in the history
…nd motd
  • Loading branch information
Mikhail Sandakov committed Sep 26, 2024
1 parent facd52f commit ee55cca
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pleskdistup/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,14 @@ def try_lock(lock_file: PathType) -> typing.Generator[bool, None, None]:
def exit_signal_handler(signum, frame):
# exit will trigger blocks finalization, so lockfile will be removed
log.info(f"Received signal {signum}, going to exit...")
print(f"The dist-upgrade process was stopped by signal {signum}. Please use the `--revert` option before trying again.")

motd.add_finish_ssh_login_message("""
The dist-upgrade process was stopped by signal.
Please use the `--revert` option before trying again.
""")
motd.publish_finish_ssh_login_message()

sys.exit(1)


Expand Down

0 comments on commit ee55cca

Please sign in to comment.