~renanrodrigo/update-manager/ss

« back to all changes in this revision

Viewing changes to ubuntu-security-status

  • Committer: Renan Rodrigo
  • Date: 2022-09-29 02:28:11 UTC
  • Revision ID: renanrodrigo@canonical.com-20220929022811-846matufvphagl2b
Prefer redirecting ubuntu-security-status to pro security-status if it exists

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
import os
8
8
import sys
9
9
import gettext
 
10
import shutil
10
11
import subprocess
11
12
 
12
13
from UpdateManager.Core.utils import get_dist
196
197
 
197
198
 
198
199
if __name__ == "__main__":
 
200
    # Prefer redirecting to 'pro security-status' if it exists
 
201
    if shutil.which("/usr/bin/pro"):
 
202
        print("This command has been replaced with 'pro security-status'.")
 
203
        subprocess.run(["/usr/bin/pro", "security-status"])
 
204
        sys.exit(0)
 
205
 
199
206
    # gettext
200
207
    APP = "update-manager"
201
208
    DIR = "/usr/share/locale"