Verified Commit 927860b4 authored by Adam Mercer's avatar Adam Mercer
Browse files

use distutils to locate rpm executable

parent e5dc98a7
......@@ -20,9 +20,11 @@
import subprocess
from distutils.spawn import find_executable
# method to get the package name from the source
def get_package_name_from_source_rpm(source):
cmd = ['rpm', '--queryformat', '%{NAME}', '-qp', source]
rpm = find_executable('rpm')
cmd = [rpm, '--queryformat', '%{NAME}', '-qp', source]
return subprocess.check_output(cmd).decode()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment