Change in vdsm[master]: [WIP] Unified persistence.
psebek at redhat.com
psebek at redhat.com
Tue Jul 16 10:51:58 UTC 2013
Petr Šebek has posted comments on this change.
Change subject: [WIP] Unified persistence.
......................................................................
Patch Set 9: I would prefer that you didn't submit this
(1 inline comment)
I just want to see your response to Mark Wu's comments.
....................................................
File vdsm/configNetwork.py
Line 155: def _saveRunningConfig(config, path):
Line 156: dirPath = os.path.dirname(path)
Line 157: if not os.path.exists(dirPath):
Line 158: os.makedirs(dirPath)
Line 159: json.dump(config, open(path, 'w'))
Shouldn't this be rather:
with open(path, 'w') as f:
json.dump(config, f)
?
I know that file will get closed at some point, but it depends on interpreter.
I read that using is best practice. But I would also be like to here your opinion about that.
Line 160:
Line 161:
Line 162: def _removeRunningConfig(path):
Line 163: try:
--
To view, visit http://gerrit.ovirt.org/16699
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I7137a96f84abd2c5e532c6c37737e36ef17567a9
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Assaf Muller <amuller at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Giuseppe Vallarelli <gvallare at redhat.com>
Gerrit-Reviewer: Livnat Peer <lpeer at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Petr Šebek <psebek at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
More information about the vdsm-patches
mailing list