summaryrefslogtreecommitdiff
path: root/bin
diff options
authorPMR <pmr@pmr-lander>2019-09-06 12:56:14 +0000
committerPMR <pmr@pmr-lander>2019-09-06 12:56:14 +0000
commite25089792ec83bd80b603e3c3952e2ebfda1378c (patch)
tree9a9b3709cd5a11ceb08a579b6bc89db9029a1a08 /bin
parentedd8f0bcde9cb946ab5242b73fad7cd697822d3f (diff)
parentbb71c49e0344a86edc5a7dac7d37e59df27dadc7 (diff)
Merge #372373 from ~rodsmith/plainbox-provider-checkbox:fix-deprecated-linux_distribution
Fix a deprecation warning in the boot_mode_test script relating to the platform.linux_distribution() function.
Diffstat (limited to 'bin')
-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():