Alon Bar-Lev has posted comments on this change. Change subject: pki: remove the need to store ssh public key ......................................................................
Patch Set 14: (3 inline comments) .................................................... File packaging/fedora/setup/engine-setup.py Line 859: basedefs.EXEC_SSH_KEYGEN, Line 860: "-yf", basedefs.FILE_PRIVATE_SSH_KEY Line 861: ] Line 862: pubkey, rc = utils.execCmd(cmdList=cmd, failOnError=True) Line 863: pubtempfd, pubtemp = tempfile.mkstemp(suffix=".pub") I thought about this, but the extra indent is ugly, so I moved it to the global cleanup code. Line 864: os.close(pubtempfd) Line 865: with open(pubtemp, "w") as f: Line 866: f.write(pubkey) Line 867: cmd = [ Line 866: f.write(pubkey) Line 867: cmd = [ Line 868: basedefs.EXEC_SSH_KEYGEN, Line 869: "-lf", pubtemp Line 870: ] I prefer one cleanup per function... If you think it is really important I will change. Line 871: finger, rc = utils.execCmd(cmdList=cmd, failOnError=True) Line 872: msg = output_messages.INFO_CA_SSH_FINGERPRINT%(finger.split()[1]) Line 873: controller.MESSAGES.append(msg) Line 874: Line 881: Line 882: except: Line 883: logging.error(traceback.format_exc()) Line 884: raise Exception(output_messages.ERR_EXP_CREATE_CA) Line 885: finally: I defined it on top. Line 886: if pubtemp != None: Line 887: os.remove(pubtemp) Line 888: Line 889: def _changeCaPermissions(pkiDir): -- To view, visit http://gerrit.ovirt.org/4853 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I328baded92b2e7c5169bc87e7c19680f598389b9 Gerrit-PatchSet: 14 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Juan Hernandez <[email protected]> Gerrit-Reviewer: Alon Bar-Lev <[email protected]> Gerrit-Reviewer: Doron Fediuck <[email protected]> Gerrit-Reviewer: Itamar Heim <[email protected]> Gerrit-Reviewer: Juan Hernandez <[email protected]> Gerrit-Reviewer: Laszlo Hornyak <[email protected]> Gerrit-Reviewer: Ofer Schreiber <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
