summaryrefslogtreecommitdiffstats
path: root/src/software/lmi/software/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/software/lmi/software/core')
-rw-r--r--src/software/lmi/software/core/IdentityFileCheck.py4
-rw-r--r--src/software/lmi/software/core/InstallationService.py10
-rw-r--r--src/software/lmi/software/core/Job.py8
3 files changed, 11 insertions, 11 deletions
diff --git a/src/software/lmi/software/core/IdentityFileCheck.py b/src/software/lmi/software/core/IdentityFileCheck.py
index 8453475..c3ca7f0 100644
--- a/src/software/lmi/software/core/IdentityFileCheck.py
+++ b/src/software/lmi/software/core/IdentityFileCheck.py
@@ -952,9 +952,9 @@ def file_check2model(file_check, keys_only=True, model=None, job=None):
if not keys_only:
model.path.update( #pylint: disable=E1103
- {k: None for k in ("Name", "SoftwareElementID",
+ dict((k, None) for k in ("Name", "SoftwareElementID",
"SoftwareElementState", "TargetOperatingSystem", "Version",
- "CheckID")})
+ "CheckID")))
model['Name'] = file_check.path
model['SoftwareElementID'] = file_check.pkg_info.nevra
diff --git a/src/software/lmi/software/core/InstallationService.py b/src/software/lmi/software/core/InstallationService.py
index cf64ff8..9bb085b 100644
--- a/src/software/lmi/software/core/InstallationService.py
+++ b/src/software/lmi/software/core/InstallationService.py
@@ -175,13 +175,13 @@ class Values(object):
13 : "ScheduleInstallAt",
}
- InstallOptions.supported = {
+ InstallOptions.supported = set([
InstallOptions.Install,
InstallOptions.Update,
InstallOptions.Uninstall,
InstallOptions.Force_installation,
InstallOptions.Repair,
- }
+ ])
class CheckSoftwareIdentity(object):
@@ -681,7 +681,7 @@ def _install_or_remove_check_params(
elif not isinstance(install_options, list):
raise InstallationError(values.Unspecified_Error,
"InstallOptions must be a list of uint16 values.")
- options = {p for p in install_options}
+ options = set([p for p in install_options])
if options - supported_options:
raise InstallationError(values.Unspecified_Error,
@@ -700,10 +700,10 @@ def _install_or_remove_check_params(
"install option \"%s\" can not have any"
" associated value: %s" % (opt, val))
_check_target_and_collection(env, method, target, collection)
- exclusive = [opt for opt in options if opt in {
+ exclusive = [opt for opt in options if opt in set([
values.InstallOptions.Install,
values.InstallOptions.Update,
- values.InstallOptions.Uninstall }]
+ values.InstallOptions.Uninstall ])]
if len(exclusive) > 1:
raise InstallationError(values.Unspecified_Error,
"specified more than one mutually exclusive option at once: {%s}" %
diff --git a/src/software/lmi/software/core/Job.py b/src/software/lmi/software/core/Job.py
index 3154fb7..05a684b 100644
--- a/src/software/lmi/software/core/Job.py
+++ b/src/software/lmi/software/core/Job.py
@@ -672,8 +672,8 @@ def object_path2job(op):
"Missing InstanceID key property.")
instid = op['InstanceID']
match = util.RE_INSTANCE_ID.match(instid)
- if not match or match.group('clsname').lower() not in {
- c.lower() for c in JOB_CLASS_NAMES}:
+ if not match or match.group('clsname').lower() not in set([
+ c.lower() for c in JOB_CLASS_NAMES]):
raise pywbem.CIMError(pywbem.CIM_ERR_INVALID_PARAMETER,
"InstanceID must start with one of {%s} prefixes."
" And end with positive integer." % (
@@ -709,8 +709,8 @@ def modify_instance(instance):
"deleteoncompletion" : "delete_on_completion",
"timebeforeremoval" : "time_before_removal"
}
- metadata_props = {"name"}
- reschedule_props = {"delete_on_completion", "time_before_removal"}
+ metadata_props = set(["name"])
+ reschedule_props = set(["delete_on_completion", "time_before_removal"])
for name, prop in instance.properties.items():
if prop is None:
LOG().warn('property "%s" is None', name)