Alon Bar-Lev has posted comments on this change. Change subject: vdsm_config: move download certificate ......................................................................
Patch Set 21: (3 comments) http://gerrit.ovirt.org/#/c/26718/21/vdsm_reg/vdsm-reg-setup.in File vdsm_reg/vdsm-reg-setup.in: Line 216: if fOK and not os.path.exists(self.engineWebCACert): Line 217: fd_tmp, file_tmp = tempfile.mkstemp() Line 218: os.close(fd_tmp) Line 219: Line 220: download_certificate_succeeded = None none for boolean value should be avoided. Line 221: try: Line 222: if not deployUtil.getRhevmCert( Line 223: IP=self.vdcName, Line 224: port=self.vdcPORT, Line 217: fd_tmp, file_tmp = tempfile.mkstemp() Line 218: os.close(fd_tmp) Line 219: Line 220: download_certificate_succeeded = None Line 221: try: please consider: if fOK: download_certificate_succeeded = deployUtil.getRhevmCert(...) if not download_certificate_succeeded and self.cfg_fprint != "None": fOK = False if fOK and self.cfg_fprint != "None": do fingerprint magic if fOK and download_certificate_succeeded: persist Line 222: if not deployUtil.getRhevmCert( Line 223: IP=self.vdcName, Line 224: port=self.vdcPORT, Line 225: output=file_tmp Line 235: else: Line 236: logging.info( Line 237: "Downloaded Engine Web CA certificate!" Line 238: ) Line 239: download_certificate_succeeded = True setting True/False based on if/else can almost always be moved to boolean that equals the result of the expression. Line 240: Line 241: if fOK and self.cfg_fprint != "None": Line 242: download_certificate_succeeded = True Line 243: engine_fprint = deployUtil.generateFingerPrint(file_tmp) -- To view, visit http://gerrit.ovirt.org/26718 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia2c025eedd2be92b9418ddbe01efc02c913af2a7 Gerrit-PatchSet: 21 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Douglas Schilling Landgraf <dougsl...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Douglas Schilling Landgraf <dougsl...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches