This commit is contained in:
Mike McLean 2024-04-01 11:37:04 -04:00 committed by Tomas Kopecek
parent 51ba6b6dfd
commit 00b1163544

View file

@ -5,7 +5,6 @@ import os
import os.path
import subprocess
import sys
import types
from collections import OrderedDict
@ -27,7 +26,7 @@ try:
# the version from koji lib in the api data
except Exception:
VERSTR = '0.0.0'
VERSION = (0,0,0)
VERSION = (0, 0, 0)
import koji
import koji.arch
@ -82,7 +81,7 @@ def read_api():
data = OrderedDict()
# we use OrderedDicts so that our json output diffs nicely
data['version'] = list(getattr(koji, '__version_info__', (0,0,0)))
data['version'] = list(getattr(koji, '__version_info__', (0, 0, 0)))
lib_modules = (koji, koji.arch, koji.util, koji.tasks, koji.xmlrpcplus, koji.plugin)
data['lib'] = OrderedDict()
@ -135,6 +134,7 @@ def dump_module(mod):
def dump_func(func):
info = OrderedDict()
name = func.__name__
if inspect.isbuiltin(func):
info['is_builtin'] = True
# no need to dig deeper
@ -170,7 +170,6 @@ def dump_class(cls):
for name in names:
value = getattr(cls, name)
vinfo = OrderedDict()
_type = str(type(value))
vinfo['type'] = str(type(value))
if inspect.isfunction(value):
vinfo['is_function'] = True
@ -380,4 +379,4 @@ if __name__ == '__main__':
sys.exit(rv)
# the end