Remove references to 'sys.version_info'
We support Python 3.6 as a minimum now, making these checks no-ops. Change-Id: I1ff344d345b56246e6a86f7761ef900e42daefa2
This commit is contained in:
parent
4da91987d6
commit
0139c6ccac
@ -16,6 +16,7 @@
|
|||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
import resource
|
import resource
|
||||||
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
USAGE_PROGRAM = ('%s -m oslo_concurrency.prlimit'
|
USAGE_PROGRAM = ('%s -m oslo_concurrency.prlimit'
|
||||||
@ -74,12 +75,7 @@ def main():
|
|||||||
if not os.path.isabs(program):
|
if not os.path.isabs(program):
|
||||||
# program uses a relative path: try to find the absolute path
|
# program uses a relative path: try to find the absolute path
|
||||||
# to the executable
|
# to the executable
|
||||||
if sys.version_info >= (3, 3):
|
program_abs = shutil.which(program)
|
||||||
import shutil
|
|
||||||
program_abs = shutil.which(program)
|
|
||||||
else:
|
|
||||||
import distutils.spawn
|
|
||||||
program_abs = distutils.spawn.find_executable(program)
|
|
||||||
if program_abs:
|
if program_abs:
|
||||||
program = program_abs
|
program = program_abs
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user