summaryrefslogtreecommitdiff
diff options
authorRod Smith <rod.smith@canonical.com>2019-09-05 15:00:24 -0400
committerRod Smith <rod.smith@canonical.com>2019-09-05 15:00:24 -0400
commitbb71c49e0344a86edc5a7dac7d37e59df27dadc7 (patch)
tree272d8924871b2022fe4fd4e7cc3eb1dfaa9ee192
parent14c625a1d39af04c35bd1d3ea9ef8f9522d08b93 (diff)
Fix deprecation warning about platform.linux_distribution() in
secure_boot_mode test.
-rwxr-xr-xbin/boot_mode_test18
1 files changed, 3 insertions, 15 deletions
diff --git a/bin/boot_mode_test b/bin/boot_mode_test
index 53e4fac..7c9358c 100755
--- a/bin/boot_mode_test
+++ b/bin/boot_mode_test
@@ -24,7 +24,6 @@ import os
import sys
import logging
from argparse import ArgumentParser
-from platform import linux_distribution
def version_check(check):
@@ -38,21 +37,10 @@ def version_check(check):
return code from requested check if the installed version is 16.04 or
newer.
"""
- installed_version = int(linux_distribution()[1].split('.')[0])
- if installed_version < 16:
- logging.info("This system appears to be older than 16.04 LTS so this "
- "will not block a certification in progress.")
- if check == 'efi':
- efi_boot_check()
- else:
- secure_boot_check()
-
- return 0
+ if check == 'efi':
+ return efi_boot_check()
else:
- if check == 'efi':
- return efi_boot_check()
- else:
- return secure_boot_check()
+ return secure_boot_check()
def efi_boot_check():