summaryrefslogtreecommitdiffstats
path: root/openshift-storage-libs/openshiftstoragelibs/openshift_ops.py
diff options
context:
space:
mode:
authorNitin Goyal <nigoyal@redhat.com>2019-04-15 15:36:39 +0530
committerNitin Goyal <nigoyal@redhat.com>2019-04-15 15:52:46 +0530
commita06a47467e3c7ad69e49ab4a27980af3494ee64e (patch)
tree4a60eba907d9dbd8880793a1049b2e83633e5618 /openshift-storage-libs/openshiftstoragelibs/openshift_ops.py
parent0b2c88ee59b52312c86bcceea1645a57671894af (diff)
Fix 'get_events' func for 3.9-3.11 OCP versions
As part of the fix we are fixing "AttributeError: 'str' object has no attribute 'append'" in 'get_events' func Change-Id: Ica2489e2d48f9ec8065fe0863b6c5d1633e93860
Diffstat (limited to 'openshift-storage-libs/openshiftstoragelibs/openshift_ops.py')
-rw-r--r--openshift-storage-libs/openshiftstoragelibs/openshift_ops.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/openshift-storage-libs/openshiftstoragelibs/openshift_ops.py b/openshift-storage-libs/openshiftstoragelibs/openshift_ops.py
index 26d7d0b..7e30064 100644
--- a/openshift-storage-libs/openshiftstoragelibs/openshift_ops.py
+++ b/openshift-storage-libs/openshiftstoragelibs/openshift_ops.py
@@ -1300,7 +1300,7 @@ def get_events(hostname,
field_selector.append('type=%s' % event_type)
cmd = "oc get events -o yaml"
if openshift_version.get_openshift_version() >= '3.9':
- cmd.append(" --field-selector %s" % ",".join(field_selector or "''"))
+ cmd += " --field-selector %s" % ",".join(field_selector or "''")
objects = yaml.load(command.cmd_run(cmd, hostname=hostname))['items']
if openshift_version.get_openshift_version() >= '3.9':
return objects