Petr Šebek has posted comments on this change.

Change subject: [WIP] Unified persistence.
......................................................................


Patch Set 10: (1 inline comment)

....................................................
File vdsm/vdsm-restore-net-config
Line 39:     as running configuration.
Line 40:     """
Line 41:     nets = {}
Line 42:     bonds = {}
Line 43:     for netFile in os.listdir(netinfo.NET_CONF_PERS_DIR):
You are right. Even better I would open files in 'with' statement scope, as I 
mentioned somewhere else on this patch:

    for netName in os.listdir(netinfo.NET_CONF_PERS_DIR):
        with open(os.path.join(netinfo.NETCONF_PERS_DIR, netName)) as netFile:
            nets[netName] = json.load(netFile)

    for bondName in os.listdir(netinfo.BOND_CONF_PERS_DIR):
        with open(os.path.join(netinfo.BOND_CONF_PERS_DIR, bondName)) as 
bondFile:
            bonds[bondName] = json.load(bondFile)
Line 44:         nets[os.path.basename(netFile)] = json.load(open(netFile))
Line 45: 
Line 46:     for bondFile in os.listdir(netinfo.BOND_CONF_PERS_DIR):
Line 47:         bonds[os.path.basename(bondFile)] = json.load(open(bondFile))


-- 
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: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegu...@redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegu...@redhat.com>
Gerrit-Reviewer: Assaf Muller <amul...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Giuseppe Vallarelli <gvall...@redhat.com>
Gerrit-Reviewer: Livnat Peer <lp...@redhat.com>
Gerrit-Reviewer: Mark Wu <wu...@linux.vnet.ibm.com>
Gerrit-Reviewer: Petr Šebek <pse...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to