Преглед на файлове

Don't freak out if the oc command doesn't exist.

Tim Bielawa преди 8 години
родител
ревизия
b5f46cdfd4
променени са 1 файла, в които са добавени 6 реда и са изтрити 0 реда
  1. 6 0
      roles/openshift_certificate_expiry/library/openshift_cert_expiry.py

+ 6 - 0
roles/openshift_certificate_expiry/library/openshift_cert_expiry.py

@@ -531,6 +531,9 @@ an OpenShift Container Platform cluster
     except TypeError:
         # YAML couldn't load the result, this is not a master
         pass
+    except OSError:
+        # The OC command doesn't exist here. Move along.
+        pass
     else:
         (cert_subject,
          cert_expiry_date,
@@ -557,6 +560,9 @@ an OpenShift Container Platform cluster
     except TypeError:
         # YAML couldn't load the result, this is not a master
         pass
+    except OSError:
+        # The OC command doesn't exist here. Move along.
+        pass
     else:
         (cert_subject,
          cert_expiry_date,