summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordengzhaosen <dengzhaosen@inspur.com>2021-04-25 15:59:06 +0800
committerJorhson Deng <dengzhaosen@inspur.com>2021-04-27 02:53:57 +0000
commit0139c6ccac1e51c23b48eb3c2086845425ce308b (patch)
treef706a8e43813e4bf6864f052ac56012386f1a628
parent4da91987d6ce7de2bb61c6ed760a019961a0a344 (diff)
downloadoslo-concurrency-0139c6ccac1e51c23b48eb3c2086845425ce308b.tar.gz
Remove references to 'sys.version_info'
We support Python 3.6 as a minimum now, making these checks no-ops. Change-Id: I1ff344d345b56246e6a86f7761ef900e42daefa2
-rw-r--r--oslo_concurrency/prlimit.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/oslo_concurrency/prlimit.py b/oslo_concurrency/prlimit.py
index 5f75910..f18222f 100644
--- a/oslo_concurrency/prlimit.py
+++ b/oslo_concurrency/prlimit.py
@@ -16,6 +16,7 @@
import argparse
import os
import resource
+import shutil
import sys
USAGE_PROGRAM = ('%s -m oslo_concurrency.prlimit'
@@ -74,12 +75,7 @@ def main():
if not os.path.isabs(program):
# program uses a relative path: try to find the absolute path
# to the executable
- if sys.version_info >= (3, 3):
- import shutil
- program_abs = shutil.which(program)
- else:
- import distutils.spawn
- program_abs = distutils.spawn.find_executable(program)
+ program_abs = shutil.which(program)
if program_abs:
program = program_abs