Yaniv Kaul has posted comments on this change. Change subject: utils: atomic file write ......................................................................
Patch Set 3: (2 comments) Why not use something like https://github.com/untitaker/python-atomicwrites ? https://gerrit.ovirt.org/#/c/61950/3/lib/vdsm/utils.py File lib/vdsm/utils.py: Line 949: prefix=os.path.basename(filename) + '.', Line 950: suffix='.tmp') Line 951: os.close(fd) Line 952: try: Line 953: if os.path.exists(filename): race between this line and the next line? Line 954: shutil.copyfile(filename, tmp_filename) Line 955: with open(tmp_filename, flag) as f: Line 956: yield f Line 957: except: Line 956: yield f Line 957: except: Line 958: rmFile(tmp_filename) Line 959: raise Line 960: else: else of what if statement? -- To view, visit https://gerrit.ovirt.org/61950 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icbb5a2d3ac439a334db2c9075376f219c356762c Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Petr Horáček <phora...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Edward Haas <edwa...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček <phora...@redhat.com> Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com> Gerrit-Reviewer: Yaniv Kaul <yk...@redhat.com> Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org