mooli tayer has posted comments on this change. Change subject: Change file() to open() continued ......................................................................
Patch Set 1: (2 comments) nit http://gerrit.ovirt.org/#/c/33859/1/vdsm/caps.py File vdsm/caps.py: Line 489: Line 490: Line 491: def _getIscsiIniName(): Line 492: try: Line 493: with open('/etc/iscsi/initiatorname.iscsi') as f: consider avoiding func call inside context: with open('/etc/iscsi/initiatorname.iscsi') as f: lines = f.read() return _parseKeyVal(lines)['InitiatorName'] Line 494: return _parseKeyVal(f)['InitiatorName'] Line 495: except: Line 496: logging.error('reporting empty InitiatorName', exc_info=True) Line 497: return '' http://gerrit.ovirt.org/#/c/33859/1/vdsm/substitute_constants.py File vdsm/substitute_constants.py: Line 50: else: Line 51: f = open(fname, 'w') Line 52: Line 53: f.write(r) Line 54 Not related to this patch, but close() is missing -- To view, visit http://gerrit.ovirt.org/33859 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iab7c37fdc18cafa9dfcbd2e9a8fe4f82022dcca0 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yeela Kaplan <[email protected]> Gerrit-Reviewer: Dima Kuznetsov <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: mooli tayer <[email protected]> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
