Bladeren bron

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

Tim Bielawa 8 jaren geleden
bovenliggende
commit
b5f46cdfd4
1 gewijzigde bestanden met toevoegingen van 6 en 0 verwijderingen
  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,