fix unittest without /usr/bin/python on newer os
This commit is contained in:
parent
c0242a8ca4
commit
3ca34171a9
1 changed files with 4 additions and 5 deletions
|
|
@ -1,11 +1,10 @@
|
|||
#!/usr/bin/python
|
||||
#!/usr/bin/env python3
|
||||
import inspect
|
||||
import json
|
||||
import os
|
||||
import os.path
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from collections import OrderedDict
|
||||
|
||||
# import koji code from our checkout
|
||||
|
|
@ -18,7 +17,7 @@ sys.path.insert(0, kojitop)
|
|||
|
||||
setup = kojitop + '/setup.py'
|
||||
try:
|
||||
proc = subprocess.Popen(['python', setup, '--version'], stdout=subprocess.PIPE)
|
||||
proc = subprocess.Popen([sys.executable, setup, '--version'], stdout=subprocess.PIPE)
|
||||
(out, _) = proc.communicate()
|
||||
VERSTR = out.decode().strip()
|
||||
VERSION = tuple([int(x) for x in VERSTR.split('.')])
|
||||
|
|
@ -30,10 +29,10 @@ except Exception:
|
|||
|
||||
import koji
|
||||
import koji.arch
|
||||
import koji.plugin
|
||||
import koji.tasks
|
||||
import koji.util
|
||||
import koji.xmlrpcplus
|
||||
import koji.tasks
|
||||
import koji.plugin
|
||||
|
||||
if VERSION >= (1, 32, 0):
|
||||
from kojihub import kojixmlrpc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue