summaryrefslogtreecommitdiffstats
path: root/src/software
diff options
context:
space:
mode:
Diffstat (limited to 'src/software')
-rw-r--r--src/software/lmi/software/LMI_HostedSoftwareIdentityResource.py4
-rwxr-xr-xsrc/software/test/test_software_identity_checks.py3
2 files changed, 5 insertions, 2 deletions
diff --git a/src/software/lmi/software/LMI_HostedSoftwareIdentityResource.py b/src/software/lmi/software/LMI_HostedSoftwareIdentityResource.py
index cc6182e..942d1f2 100644
--- a/src/software/lmi/software/LMI_HostedSoftwareIdentityResource.py
+++ b/src/software/lmi/software/LMI_HostedSoftwareIdentityResource.py
@@ -41,8 +41,8 @@ def generate_system_referents(env, object_name, model, _keys_only):
Handler for referents enumeration request.
"""
ComputerSystem.check_path(env, object_name, "Antecedent")
- repomodel = util.new_instance_name('LMI_SoftwareIdentityResource',
- Antecedent=ComputerSystem.get_path())
+ repomodel = util.new_instance_name('LMI_SoftwareIdentityResource')
+ model["Antecedent"] = ComputerSystem.get_path()
for repo in YumDB.get_instance().get_repository_list('all'):
model["Dependent"] = IdentityResource.repo2model(repo, model=repomodel)
yield model
diff --git a/src/software/test/test_software_identity_checks.py b/src/software/test/test_software_identity_checks.py
index 9ebd7ff..65ac6f4 100755
--- a/src/software/test/test_software_identity_checks.py
+++ b/src/software/test/test_software_identity_checks.py
@@ -97,6 +97,9 @@ class TestSoftwareIdentityChecks(base.SoftwareBaseTestCase):
"""
for pkg in self.safe_pkgs:
files = self.pkgdb_files[pkg.name]
+ if not files:
+ # package may not have any file
+ continue
objpath = self.make_op(pkg, files[0])
refs = self.conn.AssociatorNames(
Role="Element",